我必须进行导出,因为我一直在尝试使用 Linux。我知道保存了许多设置~/.config/
,但其中似乎不包括 Kwin 脚本或窗口装饰本身,因此我必须在新的 KDE 安装中重新安装它们。我查看了 konsave 之类的工具,但那只适用于点文件。
我一直在使用 wine,但效果不太好所以我将其删除了。
之后 Wine 的 7-zip 仍然存在于gnome-menus
(应用程序菜单)我该如何解决这个问题
我已从存储库中删除wine
安装。我已从自己的存储库中main
删除winehq-stable
winehq
如果我输入sudo apt-get remove --purge wine winehq-stable
它说:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'wine' is not installed, so not removed
Package 'winehq-stable' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
我该如何修复它?
$ snap list
snap: error while loading shared libraries: libxcb.so.1: cannot open shared object file: No such file or directory
$ whereis libxcb.so.1
libxcb.so.1: /usr/lib/x86_64-linux-gnu/libxcb.so.1
$ which snap
/usr/bin/snap
$ sha256sum /bin/snap
06d498c41a5bf2f4d836fb50ff02749c82297fd3e74e41d78bb089292158be5a /bin/snap
$ file /bin/snap
/bin/snap: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, Go BuildID=_XiLSmroeRJA5Uo8zvaX/rt3gXAZzIqOiI-Q_dmRd/7eHWjLhhkgUrQ7Kb9WkR/V-DYZbbtce--vU_MTNt2, stripped
$ strace -o trace.out /usr/bin/snap list
$ grep -C5 'libxcb.so.1' trace.out
mmap(NULL, 1297704, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fee906c3000
mmap(0x7fee906dc000, 589824, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19000) = 0x7fee906dc000
mmap(0x7fee9076c000, 585728, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa9000) = 0x7fee9076c000
mmap(0x7fee907fb000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x138000) = 0x7fee907fb000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/cuda/include/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/cuda/lib64/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/local/lib/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "glibc-hwcaps/x86-64-v3/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "glibc-hwcaps/x86-64-v2/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libxcb.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=170600, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fee90b5b000
mmap(NULL, 172680, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fee90b30000
mmap(0x7fee90b3c000, 81920, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xc000) = 0x7fee90b3c000
--
mmap(NULL, 1297704, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7bdda3e93000
mmap(0x7bdda3eac000, 589824, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19000) = 0x7bdda3eac000
mmap(0x7bdda3f3c000, 585728, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa9000) = 0x7bdda3f3c000
mmap(0x7bdda3fcb000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x138000) = 0x7bdda3fcb000
close(3) = 0
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/x86_64-linux-gnu/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/glibc-hwcaps/x86-64-v3/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/lib/glibc-hwcaps/x86-64-v3", 0x7ffc475173a0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/glibc-hwcaps/x86-64-v2/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/lib/glibc-hwcaps/x86-64-v2", 0x7ffc475173a0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/tls/haswell/x86_64/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/lib/tls/haswell/x86_64", 0x7ffc475173a0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/tls/haswell/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/lib/tls/haswell", 0x7ffc475173a0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/tls/x86_64/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/lib/tls/x86_64", 0x7ffc475173a0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/tls/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/lib/tls", 0x7ffc475173a0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/haswell/x86_64/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/lib/haswell/x86_64", 0x7ffc475173a0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/haswell/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/lib/haswell", 0x7ffc475173a0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/x86_64/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/lib/x86_64", 0x7ffc475173a0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/snap/snapd/current/usr/lib/libxcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/lib", {st_mode=S_IFDIR|0755, st_size=130, ...}, 0) = 0
writev(2, [{iov_base="/usr/bin/snap", iov_len=13}, {iov_base=": ", iov_len=2}, {iov_base="error while loading shared libra"..., iov_len=36}, {iov_base=": ", iov_len=2}, {iov_base="libxcb.so.1", iov_len=11}, {iov_base=": ", iov_len=2}, {iov_base="cannot open shared object file", iov_len=30}, {iov_base=": ", iov_len=2}, {iov_base="No such file or directory", iov_len=25}, {iov_base="\n", iov_len=1}], 10) = 124
exit_group(127) = ?
+++ exited with 127 +++
已经尝试重新安装:
sudo apt install --reinstall snapd && sudo snap refresh
但无济于事。
Ubuntu 24.10
有什么想法吗?
EFI
我最近在一张完全空的微型 SD 卡上安装了 lubuntu 24.04。安装程序要求我执行手动分区,在此阶段,它建议我创建具有以下特征的分区非常重要:
- 分区的文件系统必须是 FAT32
- 大小必须至少为 300 MB
EFI
为分区选择挂载点非常重要/boot/efi
。
这篇文章证实了我的选择,但没有解释为什么需要创建EFI
分区。
安装程序说lubuntu 需要一个 EFI 分区,但另一条消息说如果没有EFI
分区,系统可能无法启动;所以该EFI
分区似乎不是强制性的。
另一篇文章说,如果缺少EFI
分区并且系统中没有安装任何其他引导加载程序,则所有已安装的操作系统都无法启动。
问题
是否必须存在 EFI 分区(FAT32、300MB、安装在/boot/efi
)才能正确启动 lubuntu 24.04?
几个月前,我在我的两台机器上从 20.04 LTS 升级到了 22.04 LTS;我在 /boot 中看到了以下内容:
total 275864
drwxr-xr-x 5 root root 4096 Feb 26 06:51 .
drwxr-xr-x 20 root root 4096 Sep 29 2014 ..
-rw-r--r-- 1 root root 262228 Feb 7 12:44 config-5.15.0-133-generic
-rw-r--r-- 1 root root 287013 Jan 15 11:27 config-6.8.0-52-generic
drwx------ 2 root root 4096 Dec 31 1969 efi
drwxr-xr-x 4 root root 4096 Feb 26 06:51 grub
lrwxrwxrwx 1 root root 29 Feb 26 06:48 initrd.img -> initrd.img-5.15.0-133-generic
-rw-r--r-- 1 root root 114000628 Feb 26 06:49 initrd.img-5.15.0-133-generic
-rw-r--r-- 1 root root 125713060 Feb 18 06:35 initrd.img-6.8.0-52-generic
lrwxrwxrwx 1 root root 27 Feb 26 06:48 initrd.img.old -> initrd.img-6.8.0-52-generic
drwx------ 2 root root 16384 Nov 26 2020 lost+found
-rw-r--r-- 1 root root 182800 Feb 6 2022 memtest86+.bin
-rw-r--r-- 1 root root 184476 Feb 6 2022 memtest86+.elf
-rw-r--r-- 1 root root 184980 Feb 6 2022 memtest86+_multiboot.bin
-rw------- 1 root root 6295053 Feb 7 12:44 System.map-5.15.0-133-generic
-rw------- 1 root root 8667805 Jan 15 11:27 System.map-6.8.0-52-generic
lrwxrwxrwx 1 root root 26 Feb 26 06:48 vmlinuz -> vmlinuz-5.15.0-133-generic
-rw------- 1 root root 11711400 Feb 7 13:12 vmlinuz-5.15.0-133-generic
-rw------- 1 root root 14928264 Jan 15 11:51 vmlinuz-6.8.0-52-generic
lrwxrwxrwx 1 root root 24 Feb 26 06:48 vmlinuz.old -> vmlinuz-6.8.0-52-generic
uname -r 返回:
6.8.0-52-generic
执行 sudo apt update 和 upgrade 时,版本 5.15 已更新(执行了 sudo apt autoremove 以删除旧版本,上面未显示)。知道为什么更新了这些内容吗?vmlinuz.old 指的是 6.8.0-52,但我当前的内核是 6.8.0-52?
我收到了 Ubuntu 24.04 需要更新的通知。单击通知后,出现了固件更新程序 GUI。有一个针对较新版本的 UEFI dbx 更新。更新后,系统重新启动。但是,我注意到一个严重的问题。此系统 CPU 有 16 个内核、32 个线程,系统监视器将显示 32 个 CPU 内核。UEFI dbx 更新后,系统监视器现在只显示 1 个 CPU。更新似乎损坏了系统。我该如何解决此问题?
我认为 GUIfwupdmgr
与终端有关。我刚刚运行了命令fwupdmgr get-updates
,它显示
...
Devices with the latest available firmware version:
• UEFI dbx
────────────────────────────────────────────────
Devices that have been updated successfully:
• UEFI dbx (371 → 20241101)
Uploading firmware reports helps hardware vendors to quickly identify failing and successful updates on real devices.
此外,终端命令fwupdmgr get-devices
显示了此信息(我屏蔽了下面的一些 ID 信息):
...
...
...
│ └─UEFI dbx:
│ Device ID: Some numbers
│ Summary: UEFI revocation database
│ Current version: 20241101
│ Minimum Version: 20241101
│ Vendor: UEFI:Linux Foundation
│ Install Duration: 1 second
│ GUIDs: xxx ← UEFI\CRT_xxx&ARCH_X64
│ yyy ← UEFI\CRT_yyy&ARCH_X64
│ zzz ← UEFI\CRT_zzz&ARCH_X64
│ Device Flags: • Internal device
│ • Updatable
│ • Supported on remote server
│ • Needs a reboot after installation
│ • Device is usable for the duration of the update
│ • Only version upgrades are allowed
│ • Signed Payload
更新:
我刚刚尝试重新启动系统,以查看使用(恢复模式)或较旧的 Linux 版本启动时是否也会出现此问题。我确认在使用Linux 6.11.0-19-generic (recovery mode)
和较旧版本启动时不会出现此问题Linux 6.8.0-52-generic
。此问题似乎出现在Linux 6.11.0-19-generic
最新的 Linux 版本上。
另外,我发现我确实做了一个apt upgrade
(我忘记了,并在检查 /var/log/apt/history.log 后进行了验证),它将 Linux 版本升级到了 6.11.0-19.19~24.04.1。此升级必须在 UEFI dbx 更新之后但在重新启动之前进行。
$ dpkg --list | grep linux-image
ii linux-image-6.11.0-19-generic 6.11.0-19.19~24.04.1 amd64 Signed kernel image generic
rc linux-image-6.8.0-49-generic 6.8.0-49.49 amd64 Signed kernel image generic
rc linux-image-6.8.0-50-generic 6.8.0-50.51 amd64 Signed kernel image generic
ii linux-image-6.8.0-51-generic 6.8.0-51.52 amd64 Signed kernel image generic
ii linux-image-6.8.0-52-generic 6.8.0-52.53 amd64 Signed kernel image generic
ii linux-image-generic-hwe-24.04 6.11.0-19.19~24.04.1 amd64 Generic Linux kernel image
我该如何解决这个问题Linux 6.11.0-19-generic
?
我正在使用 Ubuntu 桌面。当我想使用 ssh 连接到 Ubuntu 桌面时,我想使用主机名而不是 IP 地址。这将使连接到该设备变得更容易,因为 IP 可以在重启后更改。
所以现在我需要运行:
ssh [email protected]
不过我想要这样的东西:
ssh [email protected]
你知道如何为我的 ubuntu 桌面分配主机名吗?
相机应用程序曾经与我的 USB 网络摄像头配合使用,但现在如果我过早运行它,它要么卡在等待强制退出或等待提示,要么加载到黑屏的“无法播放相机流”消息中,而使用终端运行ffplay /dev/video0
或vlc v4l2:///dev/video0
获取视频就可以了。
同时cvlc v4l2:///dev/video0
得到:
VLC media player 3.0.20 Vetinari (revision 3.0.20-0-g6f0d0ab126b)
[00005d11a8026f60] dummy interface: using the dummy interface module...
[000078b908048bf0] xcb_window window error: X server failure
这有问题吗?
$ ls -l /dev/video*
crw-rw----+ 1 root video 81, 0 Mar 1 08:03 /dev/video0
crw-rw----+ 1 root video 81, 1 Mar 1 08:03 /dev/video1
相机应用程序的调试信息:
Library Details:
Aperture 0.6.0
GStreamer 1.24.2
Pipewire 1.0.5
Gtk 4.14.2
Cameras:
GENERAL WEBCAM (V4L2) Video/Source: {
"object.path": (gchararray) "v4l2:/dev/video0",
"api.v4l2.cap.card": (gchararray) "GENERAL WEBCAM: GENERAL WEBCAM",
"device.id": (gchararray) "42",
"clock.quantum-limit": (gchararray) "8192",
"api.v4l2.path": (gchararray) "/dev/video0",
"device.devids": (gchararray) "20736",
"node.pause-on-idle": (gchararray) "false",
"node.driver": (gchararray) "true",
"device.product.id": (gchararray) "0x224",
"api.v4l2.cap.driver": (gchararray) "uvcvideo",
"api.v4l2.cap.capabilities": (gchararray) "84a00001",
"api.v4l2.cap.version": (gchararray) "6.8.12",
"device.api": (gchararray) "v4l2",
"api.v4l2.cap.device-caps": (gchararray) "04200001",
"device.vendor.id": (gchararray) "0x1b3",
"node.name": (gchararray) "v4l2_input.pci-0000_06_00.3-usb-0_4_1.0",
"node.nick": (gchararray) "GENERAL WEBCAM",
"priority.session": (gchararray) "1000",
"client.id": (gchararray) "35",
"object.id": (gchararray) "45",
"factory.name": (gchararray) "api.v4l2.source",
"api.v4l2.cap.bus_info": (gchararray) "usb-0000:06:00.3-4",
"media.class": (gchararray) "Video/Source",
"factory.id": (gchararray) "10",
"node.description": (gchararray) "GENERAL WEBCAM (V4L2)",
"object.serial": (gchararray) "45",
"media.role": (gchararray) "Camera",
所以我刚刚收到此通知,告诉我我有一个可用的 UEFI dbx 更新,具体从 20230501 到 20241101。通常我不会担心这件事,但通知来自未知应用程序这一事实让我感到困惑。所以我想知道这是否正常。除了在 shell 中手动启动或从软件/固件更新程序应用程序启动系统更新之外,我从未见过系统更新。我使用的是运行 Ubuntu 24.04.2 LTS 的 Dell OptiPlex 7040 和 Intel Core i5-6500x4。任何帮助解决这个问题的帮助都将不胜感激。
$ ls -l
total 10
drwxrwx--x 22 www-data www-data 79 Mar 1 17:53 v1
drwxrwx--x 22 www-data www-data 79 Mar 1 17:53 v2
lrwxrwxrwx 1 root root 1 Mar 1 17:59 symlink -> v2
我参加
/home/user/symlink
,如果我竞选pwd -L
,我会得到/home/user/symlink
如果我跑
sudo pwd -L
,我会得到/home/user/v2
/home/user/symlink
当我使用 sudo 运行时如何还能得到结果?我有一个脚本,可以在 v1 中将 cron 条目添加到我的其他脚本中
并且需要 sudo 添加一些 cron 条目
cron 条目不能指向 v1 或 v2,因为当 v3 出现时,它们将会中断
更新:我之前的问题有一个拼写错误,现在已经修复。