PHP Warning after a package installation
-
After I installed package "Ntopng" I had the following message:
"PHP Warning: PHP Startup: Unable to load dynamic library 'readline.so' (tried: /usr/local/lib/php/20170718/readline.so (Shared object "libreadline.so.7" not found, required by "readline.so"), /usr/local/lib/php/20170718/readline.so.so (/usr/local/lib/php/20170718/readline.so.so: invalid file format)) in Unknown on line 0"
I'm actally using 2.4.4-RELEASE-p1
I found a possible solution in this following thread: https://forum.netgate.com/topic/151780/pfblockerng-devel-install-php-startup-errors-failed-to-load-readline-so.
May I follow same steps to solve my problem ?
Thanks and regards ! -
@ddepaolis if you’re on an old version and didn’t change the version in System/Update then you probably corrupted the package system and dependencies. For instance installed a later PHP version. You probably need to reinstall. See thread https://forum.netgate.com/topic/161797/sg-5100-auto-updated-to-new-packages-but-still-old-pfsense/5?_=1615086362670
Edit: I don’t think 2.4.4 was available anymore anyway.
-
@teamits said in PHP Warning after a package installation:
if you’re on an old version and didn’t change the version in System/Update then you probably corrupted the package system and dependencies. For instance installed a later PHP version. You probably need to reinstall.
Thanks for replying Steve, so according to you I'd need to reinstall all from scratch or simply remove package "Ntopng" ?
This PFSense is actually on a "production environment" and any changment have to do be done very carefully. That's why it remained on version 2.4.4 -
@ddepaolis I suspect from scratch. Haven’t run into this myself fortunately but the issue is whether the code for 2.5 installed files incompatible with 2.4 and things stop working.
I wrote this in another post for 2.4.5:
See https://redmine.pfsense.org/issues/10464. If you can't update pfSense to 21.2 you may need to get a copy of the installer from Netgate and reinstall/restore. If you're trying to stay on 2.4.5, what I would do is:*install 2.4.5
*set to Previous Stable Version in System/Updates
*install desired packages
*restore configuration
*double check Previous Stable Version is still set -
@ddepaolis said in PHP Warning after a package installation:
@teamits said in PHP Warning after a package installation:
if you’re on an old version and didn’t change the version in System/Update then you probably corrupted the package system and dependencies. For instance installed a later PHP version. You probably need to reinstall.
Thanks for replying Steve, so according to you I'd need to reinstall all from scratch or simply remove package "Ntopng" ?
This PFSense is actually on a "production environment" and any changment have to do be done very carefully. That's why it remained on version 2.4.4One thing that, unfortunately, pfSense will let you do is install "current version" packages on top of an older version of pfSense. That will then cause things to break, sometimes fatally. It will install newer versions of shared libraries in place of existing older versions that the older version of pfSense you have installed was using. The older pfSense version can't always work with the newer libraries from the newer "current" pfSense version.
So unless you first go and change that setting @teamits mentioned, if you install or update a pfSense package, that process will pull down files from the newest pfSense release branch (so in this case, that means 2.5.0 CE or 21.02_1 if you have a Netgate appliance) even when you actually have an older pfSense version installed. A number of folks have been hit with this quirk. And it happens pretty much every time a new version of pfSense is released during that window between the initial release date and when the vast majority get their systems updated.
-
Thanks for reply ! My PFSense is running on a VM so I can do a snapshot anyway before doing any type of workaround. Actually my dashboard shows the possibility to update to version 2.5. But as described in the following video, to update from 2.4.4 to 2.5 directly is not possible: https://www.youtube.com/watch?v=XkNrWWs1vJE ; in that video it's suggested to install 2.4.5 version (intermediate).
Workaround I mentioned before ( https://forum.netgate.com/topic/151780/pfblockerng-devel-install-php-startup-errors-failed-to-load-readline-so/3 won't produce any result ?
I'm also thinking to prepare a new PFSense VM (version 2.5) from scratch, restore all settings and swap with the older one... This's a longer solution but maybe safer...
-
@ddepaolis For instance did the package upgrade PHP? Anything else? You’d have to figure out what got upgraded. I would think installing 2.5 in a new VM and restoring your configuration would be the easiest way forward.