3

My pgadmin3 was perfect, working with PostgreSQL 9.3 (pg9.3)... Them I upgraded to pg9.4... And start the problems... Old pgAdmin3 not runs with new pg9.4, so pgAdmin3 needs also upgrade.

With pg9.4 working (perfect) I checked apt-cache policy pgadmin3 and see that candidate 1.20 was there, so I remove old pgadmin3 and install new pgadmin3... PROBLEM:

The following packages have unmet dependencies:
 pgadmin3 : Depends: libstdc++6 (>= 4.9) but ...
            Depends: ....
E: Unable to correct problems, you have held broken packages.

So, what I can do now?


NOTES

Complete step-by-step and messagens,

  1. All was working and I check,

    apt-cache policy pgadmin3
    pgadmin3:
      Installed: 1.18.1-2
      Candidate: 1.20.0-1.pgdg14.10+1
      Version table:
       1.20.0-1.pgdg14.10+1 0
         500 http://apt.postgresql.org/pub/repos/apt/ utopic-pgdg/main amd64 Packages
       *** 1.18.1-2 0
         500 http://br.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
         100 /var/lib/dpkg/status
    
  2. The sudo apt-get remove pgadmin3 was ok. Now the check changes, apt-cache policy pgadmin3

    pgadmin3:
     Installed: (none)
     Candidate: 1.20.0-1.pgdg14.10+1
     Version table:
       1.20.0-1.pgdg14.10+1 0
         500 http://apt.postgresql.org/pub/repos/apt/ utopic-pgdg/main amd64 Packages
       1.18.1-2 0
         500 http://br.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
         100 /var/lib/dpkg/status
    
  3. The bug arrives here, after sudo apt-get update (ok), I do

    sudo apt-get install pgadmin3`
    
    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:
     pgadmin3 : Depends: libstdc++6 (>= 4.9) but 4.8.4-2ubuntu1~14.04 is to be installed
                Depends: libwxbase3.0-0 (>= 3.0.1) but it is not going to be installed
                Depends: libwxgtk3.0-0 (>= 3.0.1) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    

PS: the question How to install PgAdmin3 version 1.20.0 in Ubuntu 14.04 is about the same subject, but is poluted and not solve 2016's problems.


This link says

There isn’t yet an apt-get package for pgAdmin 1.20.0. Step four above installs pgAdmin 1.18.0 which works with Postgres 9.4 but doesn’t provide 9.4-specific features. If you want to install pgAdmin 1.20.0 you currently need to install it from source.

But even its "(Update: on 6 January, Ubuntu’s automatic software updates upgraded pgAdmin to 1.20.0.)" is wrong, because apt-get not works as I showed.

  • pgadmin3 (= 1.20.0-1.pgdg14.10+1) needs libstdc++6 (>= 4.9) and this package isn't available for Trusty. – A.B. Dec 30 '15 at 15:17
  • @A.B. no way to fix libstdc in LTS? How to back the old version that was (not perfect but) working? – Peter Krauss Dec 30 '15 at 15:21
  • sudo apt-get install pgadmin3=1.18.1-2 – A.B. Dec 30 '15 at 15:22
  • You could try the PPA ppa:ubuntu-toolchain-r/test to install libstdc++6 4.9 – A.B. Dec 30 '15 at 15:33
  • @A.B. My fear is to let this wrong PPA to other installations ... Can I use PPA only to this update, them remove it? – Peter Krauss Dec 30 '15 at 15:42
3

pgadmin3 (= 1.20.0-1.pgdg14.10+1) needs libstdc++6 (>= 4.9) and this package isn't available for Trusty and as you say in your comments

I need Ubuntu LTS, LST, stable (!)

don't add a PPA with higher versions of libstdc++6. These packages are an integral part of the system.

Install pgadmin3 (= 1.18.1-2) again

sudo apt-get install pgadmin3=1.18.1-2

and wait some days for Ubuntu 16.04, the next LTS release.

  • Thanks a lot, about all explanations (!). Well it seems that it is a problem without solution for 14.04 LTS (even for future UBUNTU 14 upgrades?)... Accepting as "most helpful"... Ops, you also show me the "install back", that is a solution. – Peter Krauss Dec 30 '15 at 16:04
  • There is always a solution, unless stability is very important. – A.B. Dec 30 '15 at 16:07
3

I also faced this problem and after spending a whole day I found this result. These commands given below to install pgadmin3 worked in my Ubuntu.

Add the repository:

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

Install their key:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update

Install pgadmin3:

sudo apt-get install pgadmin3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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