1

what's the best way to solve this?

# apt-get install libpq-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  libpq-dev: Depends: libpq5 (= 8.3.12-0lenny1) but 8.4.5-1~bpo50+1 is to be installed

On a Debian Lenny.

/etc/apt/sources.list:

deb http://ftp.fr.debian.org/debian/ lenny main
deb-src http://ftp.fr.debian.org/debian/ lenny main
deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free
deb http://backports.debian.org/debian-backports lenny-backports main contrib non-free
deb-src http://backports.debian.org/debian-backports lenny-backports main contrib non-free

Update:

# apt-cache policy libpq5 libpq-dev
libpq5:
  Installed: 8.4.5-2~bpo50+1
  Candidate: 8.4.5-2~bpo50+1
  Version table:
 *** 8.4.5-2~bpo50+1 0
        200 http://backports.debian.org lenny-backports/main Packages
        100 /var/lib/dpkg/status
     8.3.12-0lenny1 0
        500 http://security.debian.org lenny/updates/main Packages
     8.3.11-0lenny1 0
        500 http://ftp.fr.debian.org lenny/main Packages
libpq-dev:
  Installed: (none)
  Candidate: 8.3.12-0lenny1
  Version table:
     8.4.5-2~bpo50+1 0
        200 http://backports.debian.org lenny-backports/main Packages
     8.3.12-0lenny1 0
        500 http://security.debian.org lenny/updates/main Packages
     8.3.11-0lenny1 0
        500 http://ftp.fr.debian.org lenny/main Packages

Thanks in advance,
Pascal

2
  • Please update your question with the output of apt-cache policy libpq5 libpq-dev. Nov 22, 2010 at 2:45
  • Thanks Steven, I didn't know "apt-cache policy"... so in fact I just had to specify the version to install. Nov 23, 2010 at 9:51

2 Answers 2

0
  • Try apt-get update and then the install.

  • Go into aptitude and use the "Cancel pending actions" command in the Actions menu. Then retry the install.

  • If that doesn't work, you can always try finding the specific version of the .deb it wants online and install it manually. This looks like where you can download it (make sure to get the i386 version or whatever matches your architecture).

    Once you get the .deb on your local system you can do a dpkg -i libpq-dev_8.4.5-1~bpo50+1_i386.deb and it will install it. But it might complain about missing dependencies, which are listed on that page. You'd have to track down what's missing and install them manually as well.

0

I found the solution. I needed to specify the version to install.

apt-get install libpq-dev=8.4.5-2~bpo50+1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .