Hello I'm trying to install postgreSQL on Ubuntu 20.04, but when I exexute the very first command in order to create file repository configuration:
$ sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
I get bash: lsb_release: command not found
.
It might be useful to point out that I uninstalled Python 3.6.0
and then I installed Python 3.8.5
before postgresql so I think that this could be the reason of the hassle.
Here I post some commands and its outputs I executed that can help for a better understanding of the actual problem.
sudo apt-cache policy lsb-release
lsb-release:
Installed: (none)
Candidates: (none)
Version Table:
11.1.0ubuntu2 -1
100 /var/lib/dpkg/status
sudo apt-get install lsb-release
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package lsb-release 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 "lsb-release" does not have a candidate for installation
lsb_release
bash: lsb_release: command not found
Please let me know if I should provide further information that might be useful in order to figure out what's the origin of the issue.
Thank you very much in advance
Use
sudo apt install lsb-release
orsudo apt install lsb-core
.I think a quick search might have saved.
Edit:
You could try installing via the
.deb
file which can be downloaded from UbuntuI believe the lsb_release package might still exists on your system but it's somehow no longer in PATH
Find lsb_release(usually in
usr/bin
) and then symlink. You can refer to linkSorry for my first answer.