I have tried these below commands to install PHP 5.6 while installing Lampp:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5.6
sudo apt-get install php5.6-mbstring php5.6-mcrypt php5.6-mysql
php5.6-xml
But I am getting this error:
php5.6 is already the newest version (5.6.32-
1+ubuntu16.04.1+deb.sury.org+2).
0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
21 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
/usr/bin/dpkg: error while loading shared libraries: libselinux.so.1:
cannot open shared object file: No such file or directory
E: Sub-process /usr/bin/dpkg returned an error code (127)
I tried many below links:
- E: Sub-process /usr/bin/dpkg returned an error code (1) [related to google chrome] | Ask Ubuntu
- Error while installing Apache; error is "E: Sub-process /usr/bin/dpkg returned an error code (1)" | Unix & Linux Stack Exchange
- How can I fix E: Sub-process /usr/bin/dpkg returned an error code (2)? | Ask Ubuntu
- Debian dpkg broken after apt-get upgrade | Unix & Linux Stack Exchange
But I am getting this error still, and now I am unable to use apt-get -f install
or install any other software.