You are here
Trying to install php ldap, getting an error that debian cannot locate the package
root@observium /home/admin# sudo apt-get update
Hit http://security.debian.org jessie/updates InRelease
Ign http://archive.turnkeylinux.org jessie-security InRelease
Ign http://archive.turnkeylinux.org jessie InRelease
Hit http://security.debian.org jessie/updates/main amd64 Packages
Hit http://archive.turnkeylinux.org jessie-security Release.gpg
Ign http://http.debian.net jessie InRelease
Hit http://http.debian.net jessie Release.gpg
Hit http://archive.turnkeylinux.org jessie Release.gpg
Hit http://http.debian.net jessie Release
Hit http://security.debian.org jessie/updates/contrib amd64 Packages
Hit http://security.debian.org jessie/updates/contrib Translation-en
Hit http://security.debian.org jessie/updates/main Translation-en
Hit http://http.debian.net jessie/main amd64 Packages
Hit http://archive.turnkeylinux.org jessie-security Release
Hit http://archive.turnkeylinux.org jessie Release
Hit http://http.debian.net jessie/contrib amd64 Packages
Hit http://http.debian.net jessie/contrib Translation-en
Hit http://http.debian.net jessie/main Translation-en
Hit http://archive.turnkeylinux.org jessie-security/main amd64 Packages
Hit http://archive.turnkeylinux.org jessie/main amd64 Packages
Ign http://archive.turnkeylinux.org jessie-security/main Translation-en
Ign http://archive.turnkeylinux.org jessie/main Translation-en
Reading package lists... Done
W: There is no public key available for the following key IDs:
AA8E81B4331F7F50
root@observium /home/admin# sudo apt-get install php-ldap
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php-ldap
checked this website and this is the command they advise to run
fixed
needed to run
sudo apt-get install php5-ldap
Ah yes, from Stretch (v15.x) onwards php-ldap.
As you've discovered, in Jessie (TurnKey v14.x) the PHP packages are all (mostly) named php5-XXXX (where 'XXXX' is the module name). In Stretch onwards there are metapackages named php-XXXX which depend on the real packages which include the full PHP version (which you can install directly if you'd rather for some reason, but installing the meta package is recommended). I.e. on v16.x (based on Debian Buster) 'php-ldap' will install 'php7.3-ldap'.
Installing the module (and probably restarting Apache) should be all you need to do to get it working. I.e.:
If you want to double check, then you can create a phpinfo file that you can then double check in your browser. Generally writing this into the web root of your appliance should do the trick, but some appliances may be a little tricker, some because they have rewrite rules that might block the file, in others becuase they are organised a little differently, or sometimes both. In the case of Observium, I'm not 100% sure, but you can try like this:
Then see if in your browser you can load: http://YOUR_SERVER_IP_OR_FQDN/phpinfo.php
If you can, then you should be able to see the detailed info of all the modules and config for PHP.
Add new comment