0

I have debian 11 (bullseye) on my system and want to install expect - but it doesn't seem to be known to apt, although it should be there according to this:

# apt-get install expect
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package expect

It may be that I have somehow corrupted my apt configuration (although I haven't knowingly touched anything); the reason I suspect this is that I decided to try to uninstall apt-file and reinstall it because it behaved strangely - now apt-get says it can't find it.

What could be the reason?

j4nd3r53n
  • 226
  • 3
  • 14
  • did you run `apt-get update` first? the package `expect` is there. – Gerald Schneider Oct 06 '21 at 12:54
  • @GeraldSchneider Yes, I did run apt-get update. What confuses me is that it also can't find a package I had installed previously and now wanted to reinstall. – j4nd3r53n Oct 06 '21 at 13:33
  • 1
    Take a look at the [questions and answers regarding `apt broken` over at the Unix SE site](https://unix.stackexchange.com/search?q=apt+broken). – Gerald Schneider Oct 06 '21 at 13:54
  • @GeraldSchneider I've looked through the suggestions, but found nothing that addresses my issue. I'll try my question over there, if this isn't the right forum. – j4nd3r53n Oct 06 '21 at 14:24
  • I already voted to migrate your question over. Cross posting is not allowed on most SE sites. But I've seen answers that should address exactly your issue. You most probably need to download and reinstall the .deb files for apt manually. – Gerald Schneider Oct 06 '21 at 14:26
  • Maybe it's easier to reinstall the server and restore backups though. – Gerald Schneider Oct 06 '21 at 14:27
  • @GeraldSchneider I actually found the solution by accident just now: someone/something (and it certainly wasn't me) had commented out every line in source.list. Hard to guess why, but there you are! – j4nd3r53n Oct 06 '21 at 14:53
  • Then please post this as an answer and don't forget to accept it when you can. – Gerald Schneider Oct 06 '21 at 15:36

0 Answers0