Skip to main content

Error installing php-db in Debian 10 Buster [Resolved]

I have been tried install php-db in Debian 10 Buster, which is a dependency required by PandoraFMS Console (I'm installing it) but not working to me.

when I try to install I lack the dependency:

[...]
dpkg: dependency problems prevent configuration of pandorafms-console:
   pandorafms-console depends on php-db; however:
      Package php-db is not installed.

And if I try to install php-db manually:

# apt install php-db
[...]
Package php-db is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php-db' has no installation candidate

In packages.debian.org I can search the package and I found that:

Package php-db

+ jessie (oldoldstable) (php): PHP PEAR Database Abstraction Layer
  1.7.14-3: all
+ stretch (oldstable) (php): Database Abstraction Layer
  1.9.2-1: all
+ sid (unstable) (php): Database Abstraction Layer
  1.9.2-2: all

For more information, the content of /etc/apt/sources.list is (obviated comments):

deb http://deb.debian.org/debian buster main
deb-src http://deb.debian.org/debian buster main

deb http://security.debian.org/ buster/updates main
deb-src http://security.debian.org/ buster/updates main
deb http://deb.debian.org/debian buster-updates main
deb-src http://deb.debian.org/debian buster-updates main

deb http://deb.debian.org/debian buster-backports main
deb-src http://deb.debian.org/debian buster-backports main

The directory /etc/apt/sources.list.d/ is empty.

What I can do?


Question Credit: baquilare
Question Reference
Asked October 9, 2019
Tags: linux, debian
Posted Under: Unix Linux
9 views
2 Answers

I too face this problem of omitted packages, There are two ways to counter this,

1. You can download the specific missing package.

Now this something i really hate when i go for really stable system. This has potential to break your system if you're not fully aware of your doings.

2. You can add the repositry of last Debian distribution which had this package.

In your scenario its says that oldstable had that package,

 + stretch (oldstable) (php): Database Abstraction Layer
  1.9.2-1: all

Why don't you append old stable repositry, just add following to your /etc/apt/sources.list

deb http://deb.debian.org/debian/ oldstable main contrib non-free

Then just update and install like regular package.

sudo apt update && sudo apt install php-db && apt-mark hold php-db

But careful not to add unstable or testing repositries.


credit: Mercurial
Answered October 9, 2019
Your Answer