Upgrading to 18.04 caused issue with php installation
5,946
For repairing the damaged php installation, first remove the installed php:
sudo apt-get --purge remove php*
sudo apt autoremove
Then, re-install the latest php (7.2 in Ubuntu 18.04):
sudo apt-get install php
If you'd like to stick to php 7.1 (as 20160303
suggests you have), you may install it from Ondřej Surý's PHP repository:
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt-get install php-7.1
Related videos on Youtube
Author by
A.Raza
I am working in Square63 as a PHP developer and currently working in Drupal & Laravel.
Updated on September 18, 2022Comments
-
A.Raza over 1 year
I have recently upgraded to 18.04 LTS but seems like a library is broken or missing and its
remctl.so
for php. Whenever running php command in CLI I get this warning.PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/remctl.so' - /usr/lib/php/20160303/remctl.so: cannot open shared object file: No such file or directory in Unknown on line 0
Update: I installed PHP like 3 months ago when I installed ubuntu 17.01 but as soon as I heard about the LTS release of 18.04 I thought to upgrade to it. And after that I start getting warning on every command of PHP in CLI.
-
David Foerster almost 6 yearsCould you please edit your question to describe how you installed PHP and if you performed the Ubuntu release upgrade before or after its installation? Thanks.
-
-
A.Raza almost 6 yearsGetting this message on sudo apt-get --purge remove php*
E: Unable to locate package phpunit.xml E: Couldn't find any package by glob 'phpunit.xml' E: Couldn't find any package by regex 'phpunit.xml'
-
A.Raza almost 6 yearsSwitched to php7.2 and issue seems to be gone. Seeing nice and clean CLI. Issue seems to be with 7.1 version only. Hope none of my projects will require 7.1 ;p
-
valiano almost 6 years@A.Raza great, glad 7.2 is working for you. If you found the answer useful, please consider accepting it. Cheers!