Ubuntu 22.04 - E: Package 'php-pdo' has no installation candidate
-
dunderwood
- Posts: 4
- Joined: Fri Dec 13, 2024 11:10 am
Ubuntu 22.04 - E: Package 'php-pdo' has no installation candidate
Hello,
I am attempting to install on a clean Ubuntu 22.04 instance.
The error which stops the installation is:
E: Package 'php-pdo' has no installation candidate
I am working with version 2024R1.3.2 released on 2024-12-12 release 60302 which was downloaded from:
https://assets.nagios.com/downloads/nag ... est.tar.gz
I have attached my install.log and sources.list.
Any help resolving this problem will be very appreciated.
I am attempting to install on a clean Ubuntu 22.04 instance.
The error which stops the installation is:
E: Package 'php-pdo' has no installation candidate
I am working with version 2024R1.3.2 released on 2024-12-12 release 60302 which was downloaded from:
https://assets.nagios.com/downloads/nag ... est.tar.gz
I have attached my install.log and sources.list.
Any help resolving this problem will be very appreciated.
You do not have the required permissions to view the files attached to this post.
- jmichaelson
- Posts: 375
- Joined: Wed Aug 23, 2023 1:02 pm
Re: Ubuntu 22.04 - E: Package 'php-pdo' has no installation candidate
It looks to me from the install log that its trying to use the sury repositories for PHP installation. They're not in the sources.list that you attached. Might they be referenced under /etc/apt/sources.list.d? If so, try removing those repos (or at least commenting them out) while you're installing Nagios XI. They're not really necessary any longer for XI to run.
Please let us know if you have any other questions or concerns.
-Jason
-Jason
-
dunderwood
- Posts: 4
- Joined: Fri Dec 13, 2024 11:10 am
Re: Ubuntu 22.04 - E: Package 'php-pdo' has no installation candidate
Jason,
Thanks for the suggestion.
I'm afraid my sources.list.d is empty.
A quick internet search showed that in order to add the "Sury" repository to Ubuntu 22 apt I would need to "add the "ppa:ondrej/php" repository".
There is an ondrej listed in my sources.list as follows:
deb http://ppa.launchpad.net/ondrej/php/ubuntu jammy main # disabled on upgrade to jammy
Are you suggesting I comment that out before trying the install again?
I'm reluctant to simply try things without asking here first because I don't want to corrupt the "clean" installation or muck of the install log.
Thanks again.
Thanks for the suggestion.
I'm afraid my sources.list.d is empty.
A quick internet search showed that in order to add the "Sury" repository to Ubuntu 22 apt I would need to "add the "ppa:ondrej/php" repository".
There is an ondrej listed in my sources.list as follows:
deb http://ppa.launchpad.net/ondrej/php/ubuntu jammy main # disabled on upgrade to jammy
Are you suggesting I comment that out before trying the install again?
I'm reluctant to simply try things without asking here first because I don't want to corrupt the "clean" installation or muck of the install log.
Thanks again.
-
gwesterman
- Posts: 268
- Joined: Wed Aug 23, 2023 11:29 am
Re: Ubuntu 22.04 - E: Package 'php-pdo' has no installation candidate
Hi @dunderwood,
Before making any changes that may "corrupt" the machine, you can always take snapshots so you don't have to worry about irreparably breaking something.
I would recommend first making absolutely certain that it is a clean installation, update the packages, then try a fresh install again.
If that still doesn't work and your installation is truly clean, please let us know.
Thank you!
Before making any changes that may "corrupt" the machine, you can always take snapshots so you don't have to worry about irreparably breaking something.
I would recommend first making absolutely certain that it is a clean installation, update the packages, then try a fresh install again.
If that still doesn't work and your installation is truly clean, please let us know.
Thank you!
-
dunderwood
- Posts: 4
- Joined: Fri Dec 13, 2024 11:10 am
Re: Ubuntu 22.04 - E: Package 'php-pdo' has no installation candidate
Hello again,
This Ubuntu installation is a VM instance and I made sure there was a snapshot just after OS installation.
I have tried two more installs.
The first was with no changes just in case something happened over the weekend to resolve this problem. It didn't.
I'm still seeing the same "E: Package 'php-pdo' has no installation candidate" error message.
The second was after commenting out "deb-src http://ppa.launchpad.net/ondrej/php/ubuntu" in sources.list.
That resulted in a different failure message, "libpcre2-dev : Depends: libpcre2-8-0 (= 10.39-3ubuntu0.1) but 10.42-3+ubuntu22.04.1+deb.sury.org+1 is to be installed".
The Nagios Software / Operating System (OS) compatibility matrix here: https://nagiosenterprises.my.site.com/s ... d-versions shows that the V.2024R1.3.2 I'm trying to install is supported.
The only thing I can think to do next is to install PHP manually to try to fulfill this requirement but that would make mine not a "clean" OS.
Does anyone have another suggestion?
Thanks!
This Ubuntu installation is a VM instance and I made sure there was a snapshot just after OS installation.
I have tried two more installs.
The first was with no changes just in case something happened over the weekend to resolve this problem. It didn't.
I'm still seeing the same "E: Package 'php-pdo' has no installation candidate" error message.
The second was after commenting out "deb-src http://ppa.launchpad.net/ondrej/php/ubuntu" in sources.list.
That resulted in a different failure message, "libpcre2-dev : Depends: libpcre2-8-0 (= 10.39-3ubuntu0.1) but 10.42-3+ubuntu22.04.1+deb.sury.org+1 is to be installed".
The Nagios Software / Operating System (OS) compatibility matrix here: https://nagiosenterprises.my.site.com/s ... d-versions shows that the V.2024R1.3.2 I'm trying to install is supported.
The only thing I can think to do next is to install PHP manually to try to fulfill this requirement but that would make mine not a "clean" OS.
Does anyone have another suggestion?
Thanks!
Re: Ubuntu 22.04 - E: Package 'php-pdo' has no installation candidate
Hi @dunderwood,
I'm not sure where your installation of Ubuntu 22 diverges from a "clean" installation but from looking over your sources.list, I'm seeing some commented out lines relating to Ubuntu-Server 16.04, so it's possible there's just enough difference in what packages are available compared to what you have on your server that you are missing something that comes stock on a fresh install of Ubuntu 22. I was just able to update my packages on a relatively pristine Ubuntu 22 server and install XI 1.3.2 with no issues, so the ideal option might be to start from a fresh install of Ubuntu 22. Otherwise, you could certainly try manually installing php, as I think it is probably more important to get XI installed on your preferred server than to preserve the "cleanliness" of the VM.
I'm not sure where your installation of Ubuntu 22 diverges from a "clean" installation but from looking over your sources.list, I'm seeing some commented out lines relating to Ubuntu-Server 16.04, so it's possible there's just enough difference in what packages are available compared to what you have on your server that you are missing something that comes stock on a fresh install of Ubuntu 22. I was just able to update my packages on a relatively pristine Ubuntu 22 server and install XI 1.3.2 with no issues, so the ideal option might be to start from a fresh install of Ubuntu 22. Otherwise, you could certainly try manually installing php, as I think it is probably more important to get XI installed on your preferred server than to preserve the "cleanliness" of the VM.
- jmichaelson
- Posts: 375
- Joined: Wed Aug 23, 2023 1:02 pm
Re: Ubuntu 22.04 - E: Package 'php-pdo' has no installation candidate
Let's see what packages are already installed on your system. Run and attach the resulting dpkg.txt
Code: Select all
dpkg -l > /tmp/dpkg.txtPlease let us know if you have any other questions or concerns.
-Jason
-Jason
Re: Ubuntu 22.04 - E: Package 'php-pdo' has no installation candidate
Hi all,
Not sure if this will help, but for the visual, here is a comparison of a successful XI 2024R1.3.2 install on Ubuntu 22.04 (minimal) and @dunderwood's install.log
Not sure if this will help, but for the visual, here is a comparison of a successful XI 2024R1.3.2 install on Ubuntu 22.04 (minimal) and @dunderwood's install.log
You do not have the required permissions to view the files attached to this post.
Please let us know if you have any other questions or concerns.
-Laura
-Laura
- jmichaelson
- Posts: 375
- Joined: Wed Aug 23, 2023 1:02 pm
Re: Ubuntu 22.04 - E: Package 'php-pdo' has no installation candidate
Given that, I'm going to recommend commenting out the launchpad.net line from /etc/apt/sources.list and reattempting the install.
Please let us know if you have any other questions or concerns.
-Jason
-Jason
-
dunderwood
- Posts: 4
- Joined: Fri Dec 13, 2024 11:10 am
Re: Ubuntu 22.04 - E: Package 'php-pdo' has no installation candidate
Hello again.
Thank you all for your time and advise.
We realized that the server instance we were working with, though it contained no installed software, was an Ubuntu 22.04 version which had been upgraded from 16. Given that, we deleted that VM and started from scratch with a fresh VM and build the OS directly from a Ubuntu 22.04 install ISO.
Once that was in place and connected to the network, we did not apply any OS updates and took a VM snapshot.
We attempted the Nagios install and found that HTTP requests to http://www.cpan.org were being blocked at the firewall. We allowed those only to then find that https://cpan.org requests were being blocked. After allowing those, we ran the fullinstall script once again.
The latest install attempt has also failed. Looking through the install.log which I'll attach, it looks like this is failing on compile at line 11,767 "Can't locate Params/Validate.pm in @INC (you may need to install the Params::Validate module)" and "BEGIN failed--compilation aborted at lib/Nagios/Monitoring/Plugin/Functions.pm line 11." I'm not sure how to address this.
One assumption we have made is that the install script is able to be re-run. Is that correct or must the script run to successful completion in one try and, if it fails, roll back the VM snapshot before further attempts?
Any help with this most recent install failure will be as appreciated as the previous help.
Attached:
install.1.log is the first attempt.
intall.log is from the second and third.
Thank you!
Thank you all for your time and advise.
We realized that the server instance we were working with, though it contained no installed software, was an Ubuntu 22.04 version which had been upgraded from 16. Given that, we deleted that VM and started from scratch with a fresh VM and build the OS directly from a Ubuntu 22.04 install ISO.
Once that was in place and connected to the network, we did not apply any OS updates and took a VM snapshot.
We attempted the Nagios install and found that HTTP requests to http://www.cpan.org were being blocked at the firewall. We allowed those only to then find that https://cpan.org requests were being blocked. After allowing those, we ran the fullinstall script once again.
The latest install attempt has also failed. Looking through the install.log which I'll attach, it looks like this is failing on compile at line 11,767 "Can't locate Params/Validate.pm in @INC (you may need to install the Params::Validate module)" and "BEGIN failed--compilation aborted at lib/Nagios/Monitoring/Plugin/Functions.pm line 11." I'm not sure how to address this.
One assumption we have made is that the install script is able to be re-run. Is that correct or must the script run to successful completion in one try and, if it fails, roll back the VM snapshot before further attempts?
Any help with this most recent install failure will be as appreciated as the previous help.
Attached:
install.1.log is the first attempt.
intall.log is from the second and third.
Thank you!
You do not have the required permissions to view the files attached to this post.