问题描述
ubuntu 更新到 23.04 之后出现重启失败问题,报错提示 fsck exited with status code 1
, kfd amdgpu: TOPA2 not supported in kfd
,之后跳转到日志界面,无法正常启动,只能进入命令行
原因
经过仔细排查发现是 fuse 安装导致的。
appImages 运行需要 fuse 依赖
dlopen(): error loading libfuse.so.2
AppImages require FUSE to run.
You might still be able to extract the contents of this AppImage
if you run it with the --appimage-extract option.
See https://github.com/AppImage/AppImageKit/wiki/FUSE
for more information
然而如果直接安装 fuse,会自动卸载掉一些软件,进而导致无法正常启动
apt install fuse
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:
gir1.2-gnomeautoar-0.1 gir1.2-gnomedesktop-3.0 libcue2 libexiv2-27 libfreerdp-server2-2 libgexiv2-2 libgif7 libgsf-1-114 libgsf-1-common libntfs-3g89
libportal-gtk4-1 libraw20 libtss2-tctildr0 nautilus-data shotwell-common tracker tracker-extract tracker-miner-fs xwayland
使用'sudo apt autoremove'来卸载它(它们)。
将会同时安装下列软件:
libfuse2
下列软件包将被【卸载】:
fuse3 gnome-remote-desktop gnome-shell-extension-desktop-icons-ng gvfs-fuse nautilus ntfs-3g shotwell ubuntu-desktop ubuntu-desktop-minimal ubuntu-session
xdg-desktop-portal xdg-desktop-portal-gnome xdg-desktop-portal-gtk
下列【新】软件包将被安装:
fuse libfuse2
升级了 0 个软件包,新安装了 2 个软件包,要卸载 13 个软件包,有 0 个软件包未被升级。
需要下载 116 kB 的归档。
解压缩后将会空出 12.5 MB 的空间。
解决方法
方法一 重装系统
重装系统,之后不要再安装 fuse 是可以正常运行的,这也是最简单的方法
那么 appImages 运行需要 fuse 怎么办呢?
只安装 libfuse2
就行了
apt install libfuse2
方法二 不重装系统,重装部分软件
只要将上面卸载掉的软件的都装上就行了
apt install fuse3 gnome-remote-desktop gnome-shell-extension-desktop-icons-ng gvfs-fuse nautilus ntfs-3g shotwell ubuntu-desktop ubuntu-desktop-minimal ubuntu-session
xdg-desktop-portal xdg-desktop-portal-gnome xdg-desktop-portal-gtk
要装软件首先需要进入到命令行界面,在这种情况下我们可以通过 CTRL+ALT+[F1-F6] (F1到F6任选,由于默认的启动日至显示界面已经占用了F1,所以需要使用F2-F6之间的任意按键) 进入命令行界面,之后输入用户名和密码登陆,就可以重新执行安装软件命令了
总结
- 需要新增依赖时应做最小化依赖安装,尽量不要扩大依赖范围
- 执行
apt install
或其他类似的应用安装命令时,注意执行前给出的提示,尤其是会卸载掉一些软件的提示,一定要认真查看,确认是否可以被卸载,如果不能确定,在执行前做好记录,方便出问题时找到问题发生的原因,并及时恢复。