Re:Ask HN: What do you want to see in Ubuntu 17.10?
by pizza234 on Friday March 31, 2017 @11:15AM
(#14004633)
The first of the two errors has nothing to do with the package itself - packages need root permisions to be managed, which is what exactly the error is telling you:
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
^^^^^^^^^^^^^
In your case, you didn't prepend `sudo`.Regarding the second, which is instead the core of the problem, see the man page (http://manpages.ubuntu.com/manpages/xenial/man1/purge-old-ke...):
Provided by: byobu_5.106-0ubuntu1_all bug
Therefore the correct (and full) command is: sudo apt-get install byobu
As pointed out in another comment, such package is arguably a poor placement for this type of utility.
Re:Ask HN: What do you want to see in Ubuntu 17.10?
by yorwba on Friday March 31, 2017 @11:41AM
(#14004916)
I'm aware that the first errors don't have anything to do with the package itself, but this was the command line given. I was wondering what kind of setup might lead to an apt-get command (without sudo even) to display that error message.
For `apt-get install purge-old-kernels` I get
And for `sudo apt-get install purge-old-kernels`, I get But I can reproduce your error by `purge-old-kernels` alone. That is indeed strange.EDIT: I straced bash by `strace -o bashlog -f -s 10000 bash` and found the culprit to be /usr/lib/command-not-found. Indeed, if you run `/usr/lib/command-not-found -- purge-old-kernels` directly, you get that same message about byobu.
EDIT2: I assumed this was some kind of bug with the database, but now I actually tried installing byobu and it does make purge-old-kernels available.