Vijayan
Vijayan Thanks for stopping by guys! I'm Vijayan and Techpulse is my beloved brainchild. Currently working as a PHP developer in a digital marketing start-up, I'm overly passionate about not just learning new things but also putting those into practice. I swear by a quote I once came across... 'What separates successful people from unsuccessful people is the former's ability to execute'. Feel free to reach out to me if you have any questions, suggestions or feedback. Hoping to see more of you here!

Ubuntu 18.04.3, relocation error, error code (127) after last updates


Ubuntu 18.04.3, relocation error, error code (127) after last updates

After the last update, I received the following updates

libidn2-0 libnss-myhostname libnss-systemd libpam-systemd libsystemd0 libudev1 systemd systemd-sysv udev

This update is causing multiple programs to fail with error messages such as: “symbol _idn2_punycode_decode version IDN2_0.0.0 not defined in file libidn2.so.0 with link time reference”

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/usr/lib/apt/methods/http: relocation error: /usr/lib/x86_64-linux-gnu/libgnutls.so.30: symbol _idn2_punycode_decode version IDN2_0.0.0 not defined in file libidn2.so.0 with link time reference
/usr/lib/apt/methods/http: relocation error: /usr/lib/x86_64-linux-gnu/libgnutls.so.30: symbol _idn2_punycode_decode version IDN2_0.0.0 not defined in file libidn2.so.0 with link time reference
/usr/lib/apt/methods/http: relocation error: /usr/lib/x86_64-linux-gnu/libgnutls.so.30: symbol _idn2_punycode_decode version IDN2_0.0.0 not defined in file libidn2.so.0 with link time reference
/usr/lib/apt/methods/http: relocation error: /usr/lib/x86_64-linux-gnu/libgnutls.so.30: symbol _idn2_punycode_decode version IDN2_0.0.0 not defined in file libidn2.so.0 with link time reference
/usr/lib/apt/methods/http: relocation error: /usr/lib/x86_64-linux-gnu/libgnutls.so.30: symbol _idn2_punycode_decode version IDN2_0.0.0 not defined in file libidn2.so.0 with link time reference
/usr/lib/apt/methods/http: relocation error: /usr/lib/x86_64-linux-gnu/libgnutls.so.30: symbol _idn2_punycode_decode version IDN2_0.0.0 not defined in file libidn2.so.0 with link time reference
/usr/lib/apt/methods/http: relocation error: /usr/lib/x86_64-linux-gnu/libgnutls.so.30: symbol _idn2_punycode_decode version IDN2_0.0.0 not defined in file libidn2.so.0 with link time reference
/usr/lib/apt/methods/http: relocation error: /usr/lib/x86_64-linux-gnu/libgnutls.so.30: symbol _idn2_punycode_decode version IDN2_0.0.0 not defined in file libidn2.so.0 with link time reference
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (127)
E: Method /usr/lib/apt/methods/http did not start correctly
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (127)
E: Method /usr/lib/apt/methods/http did not start correctly
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (127)
E: Method /usr/lib/apt/methods/http did not start correctly
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (127)
E: Method /usr/lib/apt/methods/http did not start correctly
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (127)
E: Method /usr/lib/apt/methods/http did not start correctly
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (127)
E: Method /usr/lib/apt/methods/http did not start correctly
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (127)
E: Method /usr/lib/apt/methods/http did not start correctly
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (127)
E: Method /usr/lib/apt/methods/http did not start correctly

This appears to only affect those using PHP from launchpad.net/~ondrej

Temporary solution

  1. Download this file to the machine.
  2. sudo dpkg -i <path/to/.deb>
  3. sudo apt-mark hold libidn2-0

If the system still doesn’t boot, follow the below steps

  1. Download this file to a flashdrive.
  2. Boot in recovery mode
    1. After restart, press Esc or Shift button immediately.
    2. Select Advanced Options for Ubuntu. It’s the second option on the GRUB boot splash screen.
    3. Select Ubuntu, with Linux x.xx.x 32 generic (recovery mode). This boots Ubuntu in Recovery Mode.
    4. Select root Drop to root shell prompt.
  3. Copy files from flashdrive in recovery mode.
    1. Use fdisk -l to see if your USB-Drive is identified.
    2. Remember the device (/dev/sdX) Mount the USB-Drive manually with mount /dev/sdX1 /mnt
    3. copy the downloaded files from the flashdrive into the machine. cp -a /mnt/libidn2-0_2.0.5-1_amd64.deb /home/<your_user>/Downloads/
  4. sudo dpkg -i <path/to/.deb>
  5. sudo apt-mark hold libidn2-0

How to get a list of installed packages held back from upgrade?

1
apt-mark showhold

Permanent solution

Apparently it has already been fixed. Try running sudo apt update and then apt policy libidn2-0 to see if you get the fixed version 2.2.0-2+ubuntu18.04.1+deb.sury.org+1. Only run sudo apt upgrade (or full-upgrade or dist-upgrade) if you get that new version.

Looks like this issue https://github.com/oerdnj.

Rating:

comments powered by Disqus