Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
Please update your question with the output of apt-cache policy libpq5 libpq-dev. –  Steven Monday Nov 22 '10 at 2:45
    
Thanks Steven, I didn't know "apt-cache policy"... so in fact I just had to specify the version to install. –  Pascal Polleunus Nov 23 '10 at 9:51
add comment

2 Answers 2

  • 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.

share|improve this answer
add comment
up vote 0 down vote accepted

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

apt-get install libpq-dev=8.4.5-2~bpo50+1
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.