Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libidn2-0:amd64 (2.2.0-1+ubuntu18.04.1+deb.sury.org+1) - PHP Curl Errors #1247

Closed
craftyshaun opened this issue Sep 10, 2019 · 22 comments
Closed

Comments

@craftyshaun
Copy link

@craftyshaun craftyshaun commented Sep 10, 2019

Issue & Steps to Reproduce

I completed an apt-upgrade and one of the candidates was libidn2-0:amd64.
When I upgraded to libidn2-0:amd64 (2.2.0-1+ubuntu18.04.1+deb.sury.org+1) the php curl module stoped working.

root@soda:/etc/php/5.6/mods-available# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  libicu63 linux-aws-headers-4.15.0-1034 linux-aws-headers-4.15.0-1035 linux-aws-headers-4.15.0-1037 linux-aws-headers-4.15.0-1041 linux-aws-headers-4.15.0-1043 linux-aws-headers-4.15.0-1044 pkg-php-tools shtool
Use 'apt autoremove' to remove them.
The following packages will be upgraded:
  libidn2-0
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/66.4 kB of archives.
After this operation, 9216 B disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 324176 files and directories currently installed.)
Preparing to unpack .../libidn2-0_2.2.0-1+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libidn2-0:amd64 (2.2.0-1+ubuntu18.04.1+deb.sury.org+1) over (2.0.5-1) ...
Setting up libidn2-0:amd64 (2.2.0-1+ubuntu18.04.1+deb.sury.org+1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
root@soda:/etc/php/5.6/mods-available# php -m
PHP Warning:  PHP Startup: Unable to load dynamic library 'curl.so' (tried: /usr/lib/php/20170718/curl.so (/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/php/20170718/curl.so.so (/usr/lib/php/20170718/curl.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

The fix I found after some Googling [https://superuser.com/questions/1466648/kali-linux-failed-after-upgrade] was to downgrade libidn2 manually using a deb.

root@soda:~# dpkg -i libidn2-0_2.0.5-1_amd64.deb 
dpkg: warning: downgrading libidn2-0:amd64 from 2.2.0-1+ubuntu18.04.1+deb.sury.org+1 to 2.0.5-1
(Reading database ... 324176 files and directories currently installed.)
Preparing to unpack libidn2-0_2.0.5-1_amd64.deb ...
Unpacking libidn2-0:amd64 (2.0.5-1) over (2.2.0-1+ubuntu18.04.1+deb.sury.org+1) ...
Setting up libidn2-0:amd64 (2.0.5-1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...

PHP worked as expected with the curl module active. I tried to then perform an apt-upgrade however it installed the new version and broke curl again.

Distribution

  • OS: Ubuntu Ubuntu 18.04.3 LTS
  • Architecture: 4.15.0-1048-aws #50-Ubuntu SMP Wed Sep 4 22:03:52 UTC 2019 x86_64 x86_64 x86_64
  • Repository: ppa:ondrej/php
@mbfdias
Copy link

@mbfdias mbfdias commented Sep 10, 2019

it actually breaks more apps. After the same upgrade

gnome-terminal.real: 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

had to revert to previous deb to fix
dpkg -i Downloads/libidn2-0_2.0.4-1.1build2_amd64.deb Downloads/libidn2-0_2.0.4-1.1build2_i386.deb

@arcticlinux
Copy link

@arcticlinux arcticlinux commented Sep 10, 2019

Also breaks other utilities like apt

Solution discovered via:
https://superuser.com/questions/1466648/kali-linux-failed-after-upgrade

Workaround
Downgrade libidn2-0 and mark the package as held

Package source: https://packages.ubuntu.com/bionic/libidn2-0

wget http://mirrors.kernel.org/ubuntu/pool/main/libi/libidn2/libidn2-0_2.0.4-1.1build2_amd64.deb
sudo dpkg -i libidn2-0_2.0.4-1.1build2_amd64.deb
sudo apt-mark hold libidn2-0

@McJoppy
Copy link

@McJoppy McJoppy commented Sep 10, 2019

It pretty much breaks the OS - don't reboot.

If you do reboot you will need to go to another console and manually set up network card (network manager will not start), set up route table and DNS.

Once that is done download the latest Ubuntu .deb using wget (curl broke) then install with dpkg (apt was broken too).

Possibly helpful link to Ubuntu package: https://packages.ubuntu.com/search?suite=bionic&searchon=names&keywords=libidn2-0

May be easiest to transfer from a booting computer if you don't have lynx or links2!

@drkskwlkr
Copy link

@drkskwlkr drkskwlkr commented Sep 11, 2019

ACK issue on 'standard' Ubuntu 18.04 server architecture (i.e. not related only to 'aws' architecture). Who knew this library could throw so many things so much out of whack.

Package libidn2-0 downgraded by hand & held, waiting for a solution.

@yuphing-ong
Copy link

@yuphing-ong yuphing-ong commented Sep 11, 2019

It also broke http used by apt-get:

sudo apt-get update

/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
...

@rchavik
Copy link

@rchavik rchavik commented Sep 11, 2019

In my case, i had to download the i386 version as well and install both. Otherwise dpkg couldn't proceed.

wget http://mirrors.kernel.org/ubuntu/pool/main/libi/libidn2/libidn2-0_2.0.4-1.1build2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/libi/libidn2/libidn2-0_2.0.4-1.1build2_i386.deb
sudo dpkg -i libidn2-0_2.0.4-1.1build2_*.deb
sudo apt-mark hold libidn2-0

@geidelguerra
Copy link

@geidelguerra geidelguerra commented Sep 11, 2019

In my case, i had to download the i386 version as well and install both. Otherwise dpkg couldn't proceed.

wget http://mirrors.kernel.org/ubuntu/pool/main/libi/libidn2/libidn2-0_2.0.4-1.1build2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/libi/libidn2/libidn2-0_2.0.4-1.1build2_i386.deb
sudo dpkg -i libidn2-0_2.0.4-1.1build2_*.deb
sudo apt-mark hold libidn2-0

The same over here!

@ahrasis
Copy link

@ahrasis ahrasis commented Sep 11, 2019

Faced with the same error. I use this libidn2-0_2.0.5-1_amd64.deb instead:

wget http://ftp.us.debian.org/debian/pool/main/libi/libidn2/libidn2-0_2.0.5-1_amd64.deb
sudo dpkg -i libidn2-0_2.0.5-1_amd64.deb
sudo apt-mark hold libidn2-0

@oerdnj
Copy link
Owner

@oerdnj oerdnj commented Sep 11, 2019

I hate when the upstream doesn't bump SOVERSION when they drop quote-quote-internal-quote-quote symbols :( - https://gitlab.com/libidn/libidn2/issues/74

I am going to restore the missing symbols in a minute in the next upload. Sorry for all the havoc, the other Debian maintainer who did the 2.2.0-1 upload to Debian should have noticed that.

@My1
Copy link

@My1 My1 commented Sep 11, 2019

Btw for people who already did the reboot (like me) grab a different device that has internet and usb working (i used my phone) grab the deb you need there and just transfer it over using the usb stick.

http://mirrors.kernel.org/ubuntu/pool/main/libi/libidn2/libidn2-0_2.0.4-1.1build2_amd64.deb
http://mirrors.kernel.org/ubuntu/pool/main/libi/libidn2/libidn2-0_2.0.4-1.1build2_i386.deb
clickable links for anyone affected. I could just doubleclick the relevant deb (amd64 in my case) in the package manager.

@oerdnj
Copy link
Owner

@oerdnj oerdnj commented Sep 11, 2019

It should be fixed as of this moment.

# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
(bionic-amd64)root@calcifer:/tmp# dpkg -i libidn2-0_2.2.0-2+ubuntu18.04.1+deb.sury.org+1_amd64.deb
(Reading database ... 15998 files and directories currently installed.)
Preparing to unpack libidn2-0_2.2.0-2+ubuntu18.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libidn2-0:amd64 (2.2.0-2+ubuntu18.04.1+deb.sury.org+1) over (2.0.4-1.1build2) ...
Setting up libidn2-0:amd64 (2.2.0-2+ubuntu18.04.1+deb.sury.org+1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
# apt-cache policy libidn2-0
libidn2-0:
  Installed: 2.2.0-2+ubuntu18.04.1+deb.sury.org+1
  Candidate: 2.2.0-2+ubuntu18.04.1+deb.sury.org+1
  Version table:
 *** 2.2.0-2+ubuntu18.04.1+deb.sury.org+1 500
        500 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
     2.0.4-1.1build2 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
(bionic-amd64)root@calcifer:/tmp# curl
curl: try 'curl --help' or 'curl --manual' for more information
(bionic-amd64)root@calcifer:/tmp# php -i | grep curl
/etc/php/7.3/cli/conf.d/20-curl.ini,
curl
curl.cainfo => no value => no value

@sitthykun
Copy link

@sitthykun sitthykun commented Sep 12, 2019

wget http://mirrors.kernel.org/ubuntu/pool/main/libi/libidn2/libidn2-0_2.0.4-1.1build2_amd64.deb
sudo dpkg -i libidn2-0_2.0.4-1.1build2_amd64.deb
sudo apt-mark hold libidn2-0

This work for me on AWS ubuntu 18.04.2.
Thank you so much.

@oerdnj
Copy link
Owner

@oerdnj oerdnj commented Sep 12, 2019

If you actually read the linked bug report, you would know it has been already fixed, and neither downgrading nor pinning is needed. If you pin the package version, you won’t get any security updates.

@My1
Copy link

@My1 My1 commented Sep 12, 2019

@oerdnj downgrading may be needed for users who got the dead update and are stuck though. but I agree about the pinning.

@maravento
Copy link

@maravento maravento commented Sep 14, 2019

@oerdnj It is not so simple. Those whose computers were affected by this "disaster", no program works, including network. Therefore, the only solution is to download the package to another computer, save it to a USB Flash, connect it to the affected computer, enter the TTY (because the terminal does not work), degrade package and restart. After restart everything is normalized. And it can be updated to fix the problem

@edwsantos
Copy link

@edwsantos edwsantos commented Sep 17, 2019

Any update on this? I use ubuntu on my work and everything is crazy!

@oerdnj
Copy link
Owner

@oerdnj oerdnj commented Sep 17, 2019

Any update on this? I use ubuntu on my work and everything is crazy!

#1247 (comment)

@eman1986
Copy link

@eman1986 eman1986 commented Sep 18, 2019

after doing the steps listed above I was able to get my server back in working order, I just wished I saw this before I decided to reinstall the OS on my laptop (luckily I had a secondary drive I could move my files to so it wasn't a total disaster).

@mdotk
Copy link

@mdotk mdotk commented Sep 18, 2019

I have this issue, I understand there is steps above to fix it /work around it (using another version and putting a hold on updates?) but is there another way/method steps to run to get back up and running normally without the hold? @oerdnj says there is but I don't know what this means.

@My1
Copy link

@My1 My1 commented Sep 18, 2019

Just download the .deb of the new version (it might be needed to do that on another computer and bring it to the target using a usb stick or other ways) and install it using the file explorer (gui) or dpkg or similar tools (cli), you NO NOT NEED to hold updates. This was only needed the short time until the update released, you also don't need to downgrade anymore as you can just pull in the update.

@mdotk
Copy link

@mdotk mdotk commented Sep 18, 2019

Just download the .deb of the new version (it might be needed to do that on another computer and bring it to the target using a usb stick or other ways) and install it using the file explorer (gui) or dpkg or similar tools (cli), you NO NOT NEED to hold updates. This was only needed the short time until the update released, you also don't need to downgrade anymore as you can just pull in the update.

Thank you but I can't find the link to the new version? The server is still functioning so I can use wget to get it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet