Score:0

apt-cache search : command not found

kr flag

I am using an Amazon EC2 instance with Ubuntu 22.04.1 LTS installed. I am getting "command not found" whenever I try to use "apt-cache search", both with and without "sudo " prefixed :

apt-cache search : command not found
apt-cache search libssl: command not found
sudo: apt-cache search libssl: command not found

However, when I run "apt-cache" by itself I get the general help output:

apt 2.4.8 (amd64)
Usage: apt-cache [options] command
   apt-cache [options] show pkg1 [pkg2 ...]

apt-cache queries and displays available information
... 
  search - Search the package list for a regex pattern

Any ideas how I can get this working? TIA

Score:0
kr flag

Turns out I had copied the code ("apt-cache search libssl") from https://help.ubuntu.com/community/OpenSSL, and it must have contained invisible characters. When I typed the full command in manually, it worked fine.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.