Public bug reported:

1 and 2:

```
 $ lsb_release -rd
Description:    Ubuntu 20.04.2 LTS
Release:        20.04

 $ apt-cache policy command-not-found
command-not-found:
  Installed: 20.04.4
  Candidate: 20.04.4
  Version table:
 *** 20.04.4 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu focal-updates/main i386 Packages
        100 /var/lib/dpkg/status
     20.04.2 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu focal/main i386 Packages

```

I was trying to connect to psql server. I didn't know what package I
need to install so hoped that the I would get help from the system
itself:

```
 $ psql

Command 'psql' not found, but can be installed with:

sudo apt install postgresql-client-common
```

3) What I expected to happen:
I was expecting that after installing postgresql-client-common I would be able 
to run the command.

Digging further, I found out that there's only one postgresql-
client-<version> package (postgresql-client-12), and that's not the
latest version of psql. I expect to be suggested to install either
`postgresql-client` or a correct version of `postgresql-
client-<version>` package

4) What happened instead:
I was not able to run command straightaway and had to figure out which package 
to install next with no clear help

Here's what happened when I was installing it:
```
 $ sudo apt-get install postgresql-client-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  postgresql-client-common
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 28,2 kB of archives.
After this operation, 182 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 
postgresql-client-common all 214ubuntu0.1 [28,2 kB]
Fetched 28,2 kB in 0s (93,2 kB/s)                   
Selecting previously unselected package postgresql-client-common.
(Reading database ... 282382 files and directories currently installed.)
Preparing to unpack .../postgresql-client-common_214ubuntu0.1_all.deb ...
Unpacking postgresql-client-common (214ubuntu0.1) ...
Setting up postgresql-client-common (214ubuntu0.1) ...
Processing triggers for man-db (2.9.1-1) ...
```

Here's the error message:
```
 $ psql --host 178.154.223.198 -U user9 db9
Error: You must install at least one postgresql-client-<version> package
```

** Affects: command-not-found (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1939412

Title:
  command-not-found suggests postgresql-client-common when trying to use
  psql for the first time, but this package is useless

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/command-not-found/+bug/1939412/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to