我在 Windows 10 上安装 Ubuntu 时遇到了一些错误。我刚刚进入“Ubuntu 世界”,真的需要一些帮助。
执行 apt 更新后,我收到以下错误。
"6 packages can be upgraded. Run 'apt list --upgradable' to see them.
N: Download is performed unsandboxed as root as file '/var/cache/apt-build/repository/dists/apt-build/InRelease' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)"
After doing the apt upgrade I am receiving this message.
"Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
/usr/bin/mandb: can't remove /var/cache/man/ca/CACHEDIR.TAG: Permission denied
/usr/bin/mandb: fopen /var/cache/man/ca/index.db: Permission denied
/usr/bin/mandb: can't remove /var/cache/man/ca/856: Permission denied
/usr/bin/mandb: can't search directory /usr/share/man/ca: Permission denied
/usr/bin/mandb: can't remove /var/cache/man/fr.ISO8859-1/CACHEDIR.TAG: Permission denied
/usr/bin/mandb: fopen /var/cache/man/fr.ISO8859-1/index.db: Permission denied
/usr/bin/mandb: can't remove /var/cache/man/fr.ISO8859-1/856: Permission denied
/usr/bin/mandb: can't search directory /usr/share/man/fr.ISO8859-1: Permission denied
/usr/bin/mandb: can't remove /var/cache/man/fr.UTF-8/CACHEDIR.TAG: Permission denied
/usr/bin/mandb: fopen /var/cache/man/fr.UTF-8/index.db: Permission denied
/usr/bin/mandb: can't remove /var/cache/man/fr.UTF-8/856: Permission denied
/usr/bin/mandb: can't search directory /usr/share/man/fr.UTF-8: Permission denied
/usr/bin/mandb: can't remove /var/cache/man/gl/CACHEDIR.TAG: Permission denied
/usr/bin/mandb: fopen /var/cache/man/gl/index.db: Permission denied
/usr/bin/mandb: can't remove /var/cache/man/gl/856: Permission denied
/usr/bin/mandb: can't search directory /usr/share/man/gl: Permission denied
/usr/bin/mandb: can't remove /var/cache/man/sk/CACHEDIR.TAG: Permission denied
/usr/bin/mandb: fopen /var/cache/man/sk/index.db: Permission denied
/usr/bin/mandb: can't remove /var/cache/man/sk/856: Permission denied
/usr/bin/mandb: can't search directory /usr/share/man/sk: Permission denied
/usr/bin/mandb: can't remove /var/cache/man/uk/CACHEDIR.TAG: Permission denied
/usr/bin/mandb: fopen /var/cache/man/uk/index.db: Permission denied
/usr/bin/mandb: can't remove /var/cache/man/uk/856: Permission denied
/usr/bin/mandb: can't search directory /usr/share/man/uk: Permission denied
/usr/bin/mandb: can't remove /var/cache/man/vi/CACHEDIR.TAG: Permission denied
/usr/bin/mandb: fopen /var/cache/man/vi/index.db: Permission denied
/usr/bin/mandb: can't remove /var/cache/man/vi/856: Permission denied
/usr/bin/mandb: can't search directory /usr/share/man/vi: Permission denied
Setting up emacs25 (25.2+1-6) ...
update-alternatives: error: alternative path /usr/bin/emacs25 doesn't exist
dpkg: error processing package emacs25 (--configure):
installed emacs25 package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
emacs25
E: Sub-process /usr/bin/dpkg returned an error code (1)"
非常感谢您的帮助。提前谢谢您。
以下是建议补救措施的输出。以及群组的输出。
[sudo] password for mark:
Setting up emacs25 (25.2+1-6) ...
update-alternatives: error: alternative path /usr/bin/emacs25 doesn't exist
dpkg: error processing package emacs25 (--configure):
installed emacs25 package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
emacs25
mark@Surface-Pro-4:~$ sudo apt install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up emacs25 (25.2+1-6) ...
update-alternatives: error: alternative path /usr/bin/emacs25 doesn't exist
dpkg: error processing package emacs25 (--configure):
installed emacs25 package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
emacs25
E: Sub-process /usr/bin/dpkg returned an error code (1)
mark@Surface-Pro-4:~$ groups
mark adm dialout cdrom floppy sudo audio dip video plugdev lxd netdev```
答案1
尝试运行sudo dpkg --configure -a
和sudo apt install -f
。同时粘贴的输出groups
。