Skip to content

Instantly share code, notes, and snippets.

@xandl
Last active September 11, 2019 11:42
Show Gist options
  • Save xandl/345f3992358181587d85d3cc98406d74 to your computer and use it in GitHub Desktop.
Save xandl/345f3992358181587d85d3cc98406d74 to your computer and use it in GitHub Desktop.
fix /usr/lib/apt/methods/http: relocation error with PHP from ondrej on ubunut 18
#!/bin/bash
# NEVER BLINDLY COPY COMMANDS FROM THE INTERWEBS TO THE SHELL!
sudo wget http://mirrors.kernel.org/ubuntu/pool/main/libi/libidn2/libidn2-0_2.0.4-1.1build2_amd64.deb -O libidn2-0_2.0.4-1.1build2_amd64.deb
sudo dpkg -i libidn2-0_2.0.4-1.1build2_amd64.deb
sudo apt --fix-broken install
sudo apt --allow-releaseinfo-change update
sudo apt -y dist-upgrade
sudo rm -f libidn2-0_2.0.4-1.1build2_amd64.deb
ls /etc/init.d/php7*-fpm |while read INIT; do
sudo $INIT restart
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment