Why can't I install libpq-dev or libssl-dev on ubuntu 20.04.5?

52 views Asked by At

I'm trying to install the postgresql gem version 1.5.6 for Ruby on Rails but it gives me an error that says I must install the libpq-dev package first.

Then I try sudo apt-get install libpq-dev and I got this error

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: libssl-dev but it is not installable
E: Unable to correct problems, you have held broken packages.

I also run this command apt-cache policy libpq-dev libssl-dev and this is the result

libpq-dev:
  Installed: (none)
  Candidate: 16.1-1.pgdg20.04+1
  Version table:
     16.1-1.pgdg20.04+1 500
        500 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4/main amd64 Packages
     16.0-1.pgdg20.04+1 500
        500 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4/main amd64 Packages
     15.4-1.pgdg20.04+1 500
        500 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4/main amd64 Packages
     15.3-1.pgdg20.04+1 500
        500 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4/main amd64 Packages
     15.2-1.pgdg20.04+1 500
        500 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4/main amd64 Packages
     15.1-1.pgdg20.04+1 500
        500 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4/main amd64 Packages
libssl-dev:
  Installed: (none)
  Candidate: (none)
  Version table:

This is the output of sudo apt-get install libssl-dev

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libssl-dev 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 'libssl-dev' has no installation candidate

This is my Ubuntu version

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.5 LTS
Release:    20.04
Codename:   focal

What I can do to fix this?

0

There are 0 answers