AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

全部问题(ubuntu)

Martin Hope
Zebrafish
Asked: 2025-04-10 02:16:05 +0800 CST

帮我卸载 CMake [重复]

  • 5
这个问题已经有答案了:
如何从命令行安装最新版本的 cmake? (13 个回答)
昨天关闭。

在 Linux 上安装东西对我来说真的很棘手,因为方法太多了,如果我想删除某些东西,我不知道该怎么做。我的 /usr/local/bin 文件夹中有 CMake。但是它缺少 cmake-gui,所以我想安装它,但我想删除现有的。当我执行 apt list --installed 时,没有 CMake,所以我无法用它删除它。而且我很确定我没有将 cmake 放在 bin 文件夹中。CMake 还有一些其他文件,例如在 usr/share 中,所以如果我确实想手动删除 CMake,我必须删除该文件夹,但我不知道是否还有其他文件夹。该过程应该像在 Windows 中一样简单,您安装某个东西,就会有记录,然后您可以卸载它。我知道 apt 基本上就是这样,而且我喜欢 apt,但问题是,使用 apt 时,我感兴趣的每一个软件包都真的过时了。

无论如何,假设我删除了 /usr/local/bin/cmake 和 usr/share,然后再次下载 CMake,它只会以 zip 或 tar 文件的形式提供,这意味着你只能手动将文件放在某个地方。我应该再次将文件放在 /user/local/bin 和 user/share 中吗?那么以后如果我想更新它,我必须手动重新创建这些文件夹吗?没有更好的办法了吗?

software-installation
  • 1 个回答
  • 102 Views
Martin Hope
Can Cetin
Asked: 2025-04-09 22:05:01 +0800 CST

如何列出按修改日期排序的目录?

  • 6

我尝试运行ls -t grep -v / | tr ',' ' '。该命令旨在列出该目录中所有非隐藏、非点或双点目录的目录。问题是,在名为 的文件中midLS,写入列出当前目录中所有文件和目录的命令(不包括隐藏文件或任何以点开头的文件,包括双点)。

  • 输出应按修改日期排序,条目之间用逗号和空格分隔。
  • 目录名称应以斜杠 (/) 结尾。

如何在一行中列出目录?如何解决这个问题?

command-line
  • 3 个回答
  • 355 Views
Martin Hope
Ur Niiicb
Asked: 2025-04-09 21:06:36 +0800 CST

蓝牙显示但未检测到或未被检测到,如何修复?

  • 5

内核版本: *6.11.0-21-generic*

sudo dmesg | grep -i bluetooth | tail -n 30

[    3.686609] usb 3-3: Product: Bluetooth Radio
[    5.272165] Bluetooth: Core ver 2.22
[    5.272217] NET: Registered PF_BLUETOOTH protocol family
[    5.272220] Bluetooth: HCI device and connection manager initialized
[    5.272227] Bluetooth: HCI socket layer initialized
[    5.272231] Bluetooth: L2CAP socket layer initialized
[    5.272239] Bluetooth: SCO socket layer initialized
[    5.399632] Bluetooth: hci0: urb 000000006b6bc71e failed to resubmit (2)
[    7.443428] Bluetooth: hci0: Opcode 0x0c03 failed: -110
[    8.555200] Bluetooth: hci0: unexpected event for opcode 0x0c03
[    8.556660] Bluetooth: hci0: unexpected event for opcode 0x0000
[    8.765298] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    8.765307] Bluetooth: BNEP filters: protocol multicast
[    8.765315] Bluetooth: BNEP socket layer initialized
[    8.768694] Bluetooth: MGMT ver 1.23
[   17.810960] Bluetooth: RFCOMM TTY layer initialized
[   17.810981] Bluetooth: RFCOMM socket layer initialized
[   17.810995] Bluetooth: RFCOMM ver 1.11

LSUSB

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 13d3:3601 IMC Networks Bluetooth Radio
Bus 003 Device 003: ID 04f2:b729 Chicony Electronics Co., Ltd Chicony USB2.0 Camera
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

usb-devices | grep -A 20 -i bluetooth


    S:  Product=Bluetooth Radio
    S:  SerialNumber=00e04c000001
    C:  #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
    E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
    E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
    I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
    E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
    
    T:  Bus=03 Lev=01 Prnt=02 Port=03 Cnt=01 Dev#=  3 Spd=480  MxCh= 0
    D:  Ver= 2.01 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
    P:  Vendor=04f2 ProdID=b729 Rev=27.39
    S:  Manufacturer=CHICONY
    S:  Product=Chicony USB2.0 Camera
    S:  SerialNumber=200901010001
    C:  #Ifs= 3 Cfg#= 1 Atr=80 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo
    E:  Ad=83(I) Atr=03(Int.) MxPS=  32 Ivl=4ms
    I:  If#= 1 Alt= 0 #EPs= 0 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo

lsmod | grep -i bluetooth

    bluetooth            1028096  44 btrtl,btmtk,btintel,btbcm,bnep,btusb,rfcomm

bluetooth
  • 1 个回答
  • 81 Views
Martin Hope
Can Cetin
Asked: 2025-04-09 18:49:53 +0800 CST

如何在终端中查看我所在的文件夹?[重复]

  • 5
这个问题已经有答案了:
如何在终端中更改目录并知道我在哪个目录? (3 个答案)
3天前关闭。

我启动了 Ecol42,他们使用 Ubuntu,但我在终端中看不到我位于哪个文件夹。

在此处输入图片描述

command-line
  • 1 个回答
  • 58 Views
Martin Hope
user24824621
Asked: 2025-04-09 08:28:50 +0800 CST

Ubuntu 22.04.5 LTS 内核 5.15.0-136-generic 更新导致网卡崩溃

  • 5

我们的安全扫描程序显示,当前内核 5.15.0-134-generic 版本存在漏洞。因此我进行了升级,结果网络连接严重中断。服务器启动后甚至无法识别网络接口。这是一台戴尔 Poweredge r710(我知道它很老了)。我只是想让它继续运行。“IP 地址”根本没有列出以太网卡,但显示了其他网络设备。

我唯一能想到的可能是新内核才发布一周,可能还没有更新相同的驱动程序?如果我回滚内核,网卡就能立即恢复连接。我尝试插入一个 USB 适配器,但它也检测不到,所以缺少的硬件支持并不仅限于网卡接口。我们还安装了一张 10Gb 光纤卡,它仍然可以在两个内核上运行。我以前从未遇到过这种情况。大家有什么想法或可行的解决方案吗?

networking
  • 1 个回答
  • 167 Views
Martin Hope
russoue
Asked: 2025-04-09 04:08:47 +0800 CST

需要帮助解决简历失败问题

  • 5

我有一个带有以下内核的 Ubuntu 桌面 -

~ cat /etc/os-release 
PRETTY_NAME="Ubuntu 24.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.2 LTS (Noble Numbat)"
...
~ uname -a
Linux ****** 6.8.0-57-generic #59-Ubuntu SMP PREEMPT_DYNAMIC Sat Mar 15 17:40:59 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

最近我买了一块 NVIDIA 3060 GPU -

~ lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GA106 [GeForce RTX 3060 Lite Hash Rate] (rev a1)

这是我正在使用的硬盘,也是我唯一能用的。 在此处输入图片描述 我一开始就遇到了挂起/恢复的问题,直到切换到 Wayland 才恢复成功。但是,使用 Wayland 每次启动只能成功恢复一次。第二次就失败了。我尝试比较日志,journalctl但在第一次成功挂起/恢复后,第二次尝试挂起/恢复时,我找不到问题所在。以下是成功挂起/恢复后的日志:

Apr 08 12:24:16 systemd-logind[1013]: The system will suspend now!
Apr 08 12:24:16 NetworkManager[1371]: <info>  [1744140256.6196] manager: sleep: sleep requested (sleeping: no  enabled: yes)
Apr 08 12:24:16 NetworkManager[1371]: <info>  [1744140256.6200] device (wlp4s0): state change: unavailable -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Apr 08 12:24:16 ModemManager[1399]: <msg> [sleep-monitor-systemd] system is about to suspend
Apr 08 12:24:16 NetworkManager[1371]: <info>  [1744140256.6220] device (wlxbca5119bed89): state change: unavailable -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Apr 08 12:24:16 NetworkManager[1371]: <info>  [1744140256.6237] manager: NetworkManager state is now ASLEEP
Apr 08 12:24:16 rtkit-daemon[1805]: Successfully made thread 3149 of process 3133 owned by '1000' high priority at nice level 0.
Apr 08 12:24:16 rtkit-daemon[1805]: Supervising 8 threads of 5 processes of 1 users.
Apr 08 12:24:16 gsd-media-keys[3378]: Unable to get default sink
Apr 08 12:24:16 rtkit-daemon[1805]: Supervising 7 threads of 4 processes of 1 users.
Apr 08 12:24:16 rtkit-daemon[1805]: Supervising 7 threads of 4 processes of 1 users.
Apr 08 12:24:16 rtkit-daemon[1805]: Successfully made thread 3149 of process 3133 owned by '1000' RT at priority 20.
Apr 08 12:24:16 rtkit-daemon[1805]: Supervising 8 threads of 5 processes of 1 users.
Apr 08 12:24:16 update-notifier[5058]: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
Apr 08 12:24:16 update-notifier[5058]: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
Apr 08 12:24:17 gnome-shell[3133]: Cursor update failed: drmModeAtomicCommit: Invalid argument
Apr 08 12:24:17 systemd[1]: Reached target sleep.target - Sleep.
Apr 08 12:24:17 systemd[1]: Starting nvidia-suspend.service - NVIDIA system suspend actions...
Apr 08 12:24:17 suspend[5438]: nvidia-suspend.service
Apr 08 12:24:17 logger[5438]: <13>Apr  8 12:24:17 suspend: nvidia-suspend.service
Apr 08 12:24:17 kernel: snd_hda_codec_hdmi hdaudioC2D0: HDMI: invalid ELD data byte 53
Apr 08 12:24:17 kernel: rfkill: input handler enabled
Apr 08 12:24:17 gsd-media-keys[3378]: Unable to get default sink
Apr 08 12:24:17 gsd-media-keys[3378]: Unable to get default source
Apr 08 12:24:18 systemd[1]: nvidia-suspend.service: Deactivated successfully.
Apr 08 12:24:18 systemd[1]: Finished nvidia-suspend.service - NVIDIA system suspend actions.
Apr 08 12:24:18 systemd[1]: Starting systemd-suspend.service - System Suspend...
Apr 08 12:24:18 systemd[1]: Stopping atop.service - Atop advanced performance monitor...
Apr 08 12:24:18 systemd[1]: atop.service: Deactivated successfully.
Apr 08 12:24:18 systemd[1]: Stopped atop.service - Atop advanced performance monitor.
Apr 08 12:24:18 systemd-sleep[5493]: Performing sleep operation 'suspend'...
Apr 08 12:24:18 kernel: PM: suspend entry (deep)
Apr 08 12:24:19 kernel: Filesystems sync: 1.175 seconds
Apr 08 12:24:33 kernel: Freezing user space processes
Apr 08 12:24:33 kernel: Freezing user space processes completed (elapsed 0.003 seconds)
Apr 08 12:24:33 kernel: OOM killer disabled.
Apr 08 12:24:33 kernel: Freezing remaining freezable tasks
Apr 08 12:24:33 kernel: Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
Apr 08 12:24:33 kernel: printk: Suspending console(s) (use no_console_suspend to debug)
Apr 08 12:24:33 kernel: RTW:  suspend start
Apr 08 12:24:33 kernel: serial 00:04: disabled
Apr 08 12:24:33 kernel: sd 3:0:0:0: [sdb] Synchronizing SCSI cache
Apr 08 12:24:33 kernel: parport_pc 00:01: disabled
Apr 08 12:24:33 kernel: e1000e: EEE TX LPI TIMER: 00000011
Apr 08 12:24:33 kernel: ata4.00: Entering standby power mode
Apr 08 12:24:33 kernel: sd 1:0:0:0: [sda] Synchronizing SCSI cache
Apr 08 12:24:33 kernel: ata2.00: Entering standby power mode
Apr 08 12:24:33 kernel: ACPI: PM: Preparing to enter system sleep state S3
Apr 08 12:24:33 kernel: ACPI: PM: Saving platform NVS memory
Apr 08 12:24:33 kernel: Disabling non-boot CPUs ...
Apr 08 12:24:33 kernel: smpboot: CPU 1 is now offline
Apr 08 12:24:33 kernel: smpboot: CPU 2 is now offline
Apr 08 12:24:33 kernel: smpboot: CPU 3 is now offline
Apr 08 12:24:33 kernel: smpboot: CPU 4 is now offline
Apr 08 12:24:33 kernel: smpboot: CPU 5 is now offline
Apr 08 12:24:33 kernel: smpboot: CPU 6 is now offline
Apr 08 12:24:33 kernel: smpboot: CPU 7 is now offline
Apr 08 12:24:33 kernel: ACPI: PM: Low-level resume complete
Apr 08 12:24:33 kernel: ACPI: PM: Restoring platform NVS memory
Apr 08 12:24:33 kernel: Enabling non-boot CPUs ...
Apr 08 12:24:33 kernel: smpboot: Booting Node 0 Processor 1 APIC 0x2
Apr 08 12:24:33 kernel: CPU1 is up
Apr 08 12:24:33 kernel: smpboot: Booting Node 0 Processor 2 APIC 0x4
Apr 08 12:24:33 kernel: CPU2 is up
Apr 08 12:24:33 kernel: smpboot: Booting Node 0 Processor 3 APIC 0x6
Apr 08 12:24:33 kernel: CPU3 is up
Apr 08 12:24:33 kernel: smpboot: Booting Node 0 Processor 4 APIC 0x1
Apr 08 12:24:33 kernel: CPU4 is up
Apr 08 12:24:33 kernel: smpboot: Booting Node 0 Processor 5 APIC 0x3
Apr 08 12:24:33 kernel: CPU5 is up
Apr 08 12:24:33 kernel: smpboot: Booting Node 0 Processor 6 APIC 0x5
Apr 08 12:24:33 kernel: CPU6 is up
Apr 08 12:24:33 kernel: smpboot: Booting Node 0 Processor 7 APIC 0x7
Apr 08 12:24:33 kernel: CPU7 is up
Apr 08 12:24:33 kernel: ACPI: PM: Waking up from system sleep state S3
Apr 08 12:24:33 kernel: parport_pc 00:01: activated
Apr 08 12:24:33 kernel: serial 00:04: activated
Apr 08 12:24:33 kernel: RTW: resume start
Apr 08 12:24:33 kernel: usb 2-8.4.4: reset SuperSpeed USB device number 5 using xhci_hcd
Apr 08 12:24:33 kernel: ata3: SATA link down (SStatus 4 SControl 300)
Apr 08 12:24:33 kernel: ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Apr 08 12:24:33 kernel: ata1: SATA link down (SStatus 4 SControl 300)
Apr 08 12:24:33 kernel: ata4: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Apr 08 12:24:33 kernel: ata6: SATA link down (SStatus 4 SControl 300)
Apr 08 12:24:33 kernel: ata5: SATA link down (SStatus 4 SControl 300)
Apr 08 12:24:33 kernel: ata2.00: ACPI cmd f5/00:00:00:00:00:00(SECURITY FREEZE LOCK) filtered out
Apr 08 12:24:33 kernel: ata2.00: ACPI cmd b1/c1:00:00:00:00:00(DEVICE CONFIGURATION OVERLAY) filtered out
Apr 08 12:24:33 kernel: ata4.00: ACPI cmd f5/00:00:00:00:00:00(SECURITY FREEZE LOCK) filtered out
Apr 08 12:24:33 kernel: ata4.00: ACPI cmd b1/c1:00:00:00:00:00(DEVICE CONFIGURATION OVERLAY) filtered out
Apr 08 12:24:33 kernel: ata2.00: supports DRM functions and may not be fully accessible
Apr 08 12:24:33 kernel: ata4.00: supports DRM functions and may not be fully accessible
Apr 08 12:24:33 kernel: sd 3:0:0:0: [sdb] Starting disk
Apr 08 12:24:33 kernel: ata4.00: ACPI cmd f5/00:00:00:00:00:00(SECURITY FREEZE LOCK) filtered out
Apr 08 12:24:33 kernel: ata4.00: ACPI cmd b1/c1:00:00:00:00:00(DEVICE CONFIGURATION OVERLAY) filtered out
Apr 08 12:24:33 kernel: ata4.00: supports DRM functions and may not be fully accessible
Apr 08 12:24:33 kernel: sd 1:0:0:0: [sda] Starting disk
Apr 08 12:24:33 kernel: ata2.00: ACPI cmd f5/00:00:00:00:00:00(SECURITY FREEZE LOCK) filtered out
Apr 08 12:24:33 kernel: ata2.00: ACPI cmd b1/c1:00:00:00:00:00(DEVICE CONFIGURATION OVERLAY) filtered out
Apr 08 12:24:33 kernel: ata2.00: supports DRM functions and may not be fully accessible
Apr 08 12:24:33 kernel: ata4.00: configured for UDMA/133
Apr 08 12:24:33 kernel: ata2.00: configured for UDMA/133
Apr 08 12:24:33 kernel: ata2.00: Enabling discard_zeroes_data
Apr 08 12:24:33 kernel: RTW: txpath=0x3, rxpath=0xf
Apr 08 12:24:33 kernel: RTW: txpath_1ss:0x1, num:1
Apr 08 12:24:33 kernel: RTW: txpath_2ss:0x3, num:2
Apr 08 12:24:33 kernel: RTW: wlxbca5119bed89- hw port(0) mac_addr =bc:a5:11:9b:ed:89
Apr 08 12:24:33 kernel: RTW: rtw_resume_common:0 in 400 ms
Apr 08 12:24:33 kernel: OOM killer enabled.
Apr 08 12:24:33 kernel: Restarting tasks ... done.
Apr 08 12:24:33 kernel: random: crng reseeded on system resumption
Apr 08 12:24:33 kernel: PM: suspend exit

以下是因暂停失败而导致的 -

Apr 08 12:25:49 systemd-logind[1013]: The system will suspend now!
Apr 08 12:25:49 NetworkManager[1371]: <info>  [1744140349.1102] manager: sleep: sleep requested (sleeping: no  enabled: yes)
Apr 08 12:25:49 ModemManager[1399]: <msg> [sleep-monitor-systemd] system is about to suspend
Apr 08 12:25:49 NetworkManager[1371]: <info>  [1744140349.1106] device (wlp4s0): state change: unavailable -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Apr 08 12:25:49 NetworkManager[1371]: <info>  [1744140349.1126] device (wlxbca5119bed89): state change: unavailable -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Apr 08 12:25:49 NetworkManager[1371]: <info>  [1744140349.1137] manager: NetworkManager state is now ASLEEP
Apr 08 12:25:49 rtkit-daemon[1805]: Successfully made thread 3149 of process 3133 owned by '1000' high priority at nice level 0.
Apr 08 12:25:49 rtkit-daemon[1805]: Supervising 8 threads of 5 processes of 1 users.
Apr 08 12:25:49 gsd-media-keys[3378]: Unable to get default sink
Apr 08 12:25:49 rtkit-daemon[1805]: Supervising 7 threads of 4 processes of 1 users.
Apr 08 12:25:49 rtkit-daemon[1805]: Supervising 7 threads of 4 processes of 1 users.
Apr 08 12:25:49 rtkit-daemon[1805]: Successfully made thread 3149 of process 3133 owned by '1000' RT at priority 20.
Apr 08 12:25:49 rtkit-daemon[1805]: Supervising 8 threads of 5 processes of 1 users.
Apr 08 12:25:49 update-notifier[5058]: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
Apr 08 12:25:49 update-notifier[5058]: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
Apr 08 12:25:49 systemd[1]: Reached target sleep.target - Sleep.
Apr 08 12:25:50 systemd[1]: Starting nvidia-suspend.service - NVIDIA system suspend actions...
Apr 08 12:25:50 rtkit-daemon[1805]: Successfully made thread 3149 of process 3133 owned by '1000' high priority at nice level 0.
Apr 08 12:25:50 rtkit-daemon[1805]: Supervising 8 threads of 5 processes of 1 users.
Apr 08 12:25:50 rtkit-daemon[1805]: Supervising 7 threads of 4 processes of 1 users.
Apr 08 12:25:50 suspend[6245]: nvidia-suspend.service
Apr 08 12:25:50 logger[6245]: <13>Apr  8 12:25:50 suspend: nvidia-suspend.service
Apr 08 12:25:50 rtkit-daemon[1805]: Supervising 7 threads of 4 processes of 1 users.
Apr 08 12:25:50 rtkit-daemon[1805]: Successfully made thread 3149 of process 3133 owned by '1000' RT at priority 20.
Apr 08 12:25:50 rtkit-daemon[1805]: Supervising 8 threads of 5 processes of 1 users.
Apr 08 12:25:50 kernel: snd_hda_codec_hdmi hdaudioC2D0: HDMI: invalid ELD data byte 57
Apr 08 12:25:50 kernel: rfkill: input handler enabled
Apr 08 12:25:50 gsd-media-keys[3378]: gvc_mixer_card_get_index: assertion 'GVC_IS_MIXER_CARD (card)' failed
Apr 08 12:25:50 gsd-media-keys[3378]: gvc_mixer_card_get_index: assertion 'GVC_IS_MIXER_CARD (card)' failed
Apr 08 12:25:50 gsd-media-keys[3378]: Unable to get default sink
Apr 08 12:25:50 gsd-media-keys[3378]: gvc_mixer_card_get_index: assertion 'GVC_IS_MIXER_CARD (card)' failed
Apr 08 12:25:50 gsd-media-keys[3378]: Unable to get default source
Apr 08 12:25:50 systemd[1]: nvidia-suspend.service: Deactivated successfully.
Apr 08 12:25:50 systemd[1]: Finished nvidia-suspend.service - NVIDIA system suspend actions.
Apr 08 12:25:50 systemd[1]: Starting systemd-suspend.service - System Suspend...
Apr 08 12:25:50 systemd[1]: Stopping atop.service - Atop advanced performance monitor...
Apr 08 12:25:50 systemd[1]: atop.service: Deactivated successfully.
Apr 08 12:25:50 systemd[1]: Stopped atop.service - Atop advanced performance monitor.
Apr 08 12:25:50 systemd-sleep[6286]: Performing sleep operation 'suspend'...
Apr 08 12:25:50 kernel: PM: suspend entry (deep)
-- Boot 8480182803494359b25f9d5ab8d68c1e --

正如上面的日志显示,我最终不得不硬重启系统,因为它无法从任何状态恢复。系统似乎处于挂起状态,电源关闭且电源按钮闪烁,但按下电源按钮恢复后,主板恢复供电,但显示器空白,键盘、鼠标和其他 USB 设备(如外部 WiFi 加密狗)均已关闭。

有人可以通过比较日志来帮忙找出问题所在吗?

nvidia
  • 1 个回答
  • 57 Views
Martin Hope
AlanQ
Asked: 2025-04-09 00:25:48 +0800 CST

在 /home 或符号链接内挂载单独的磁盘?

  • 5

我有两个内部 SSD 磁盘。

Ubuntu 24.04 LTS(包括/home)安装在 SSD1 上,安装过程中设置了 LVM 和 LUKS。

/etc我使用 LUKS(但不是 LVM)设置了 SSD2,它在启动期间使用密钥文件(在 SSD1 上)解锁。

SSD2 包含我的 VirtualBox“设备”。

/mnt/VMs目前,我正在使用 fstab 中的一行自动安装 SSD2 :
/dev/mapper/VMs /mnt/VMs ext4 defaults 0 2

但 VirtualBox 不允许我访问 之外的任何内容/home。

我的问题是:
我应该

  • 只需自动安装 SSD2,/home例如,/home/VMs
    /dev/mapper/VMs /home/VMs ext4 defaults 0 2
    或
  • 将 SSD2 安装在下方/mnt,并添加符号链接至下方,/home
    如果可以,该怎么做?

我原本想使用链接选项,直到我读到
“当大多数操作(打开、读取、写入等)通过符号链接文件时,内核会自动“取消引用”该链接并对链接的目标进行操作。但有些操作(例如删除)对链接文件本身进行操作,而不是对其目标进行操作。 ” ,
这info ln让我很担心,也很困惑。

mount
  • 1 个回答
  • 37 Views
Martin Hope
The MAJOR
Asked: 2025-04-08 22:31:38 +0800 CST

Ubuntu 报告分区为 105GB,但 Windows 7 仅显示 30Gb

  • 10

在 Ubuntu 24.04.2 LTS 中,我使用了:

gnome-disk-utility 46.0 
UDisks 2.10.1 (built against 2.10.1)

查看sda2的大小(在 500Gb 硬盘上),其报告为 105Gb NTFS。

报告分区类型为 NTFS/exFAT/HPFS...

但是当我在sda2上启动到WIN7时,它看到的大小只有 30Gb(当我将其克隆到新驱动器时,它在旧的 30Gb 驱动器上的大小)c:\

我怎样才能让WIN7看到/使用整个 105Gb 分区?

sda-500GB > sda1-128Mb(受保护);sda2-105Gb(WIN7);sda3-50Gb(WIN7 数据驱动器“E”);
sda4-EXT4~sda5-100Gb(Ubuntu)、sda6-100Gb(Fedora)、sda7-75Gb(未来的 WIN10)

好的 - 从终端执行“sudo ntfsresize /dev/sda2”也是如此:

sudo ntfsresize /dev/sda2
[sudo] password for batgirl: 
ntfsresize v2022.10.3 (libntfs-3g)
Device name        : /dev/sda2
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 29914911232 bytes (29915 MB)
Current device size: 104857600000 bytes (104858 MB)
New volume size    : 104857596416 bytes (104858 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Cluster accounting failed at 197485 (0x3036d): missing cluster in $Bitmap
Cluster accounting failed at 1108632 (0x10ea98): missing cluster in $Bitmap
Cluster accounting failed at 1108633 (0x10ea99): missing cluster in $Bitmap
Cluster accounting failed at 1108634 (0x10ea9a): missing cluster in $Bitmap
Cluster accounting failed at 1108635 (0x10ea9b): missing cluster in $Bitmap
Cluster accounting failed at 1108636 (0x10ea9c): missing cluster in $Bitmap
Cluster accounting failed at 1108637 (0x10ea9d): missing cluster in $Bitmap
Cluster accounting failed at 5358234 (0x51c29a): missing cluster in $Bitmap
Cluster accounting failed at 5358235 (0x51c29b): missing cluster in $Bitmap
Cluster accounting failed at 5358236 (0x51c29c): missing cluster in $Bitmap
Filesystem check failed! Totally 65 cluster accounting mismatches.
ERROR: NTFS is inconsistent. Run chkdsk /f on Windows then reboot it TWICE!
The usage of the /f parameter is very IMPORTANT! No modification was
and will be made to NTFS by this software until it gets repaired.

将 Ubuntu 置于休眠状态并启动到 WIN7,但是它已经处于休眠状态,因此关闭它然后执行 chkdsk /f,并启动到 Windows,然后执行 chkdsk /f,再次启动到 Windows,但仍然显示只有 30Gb......

将再次从 Ubuntu 终端运行 sudo ntfsresize /dev/sda2,但这次 WIN7 不处于休眠状态:

> sudo ntfsresize /dev/sda2
[sudo] password for batgirl: 
ntfsresize v2022.10.3 (libntfs-3g)
Device name        : /dev/sda2
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 29914911232 bytes (29915 MB)
Current device size: 104857600000 bytes (104858 MB)
New volume size    : 104857596416 bytes (104858 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use       : 28372 MB (94.8%)
Collecting resizing constraints ...
WARNING: Every sanity check passed and only the dangerous operations left.
Make sure that important data has been backed up! Power outage or computer
crash may result major data loss!
Are you sure you want to proceed (y/[n])? y
Schedule chkdsk for NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Updating $BadClust file ...
Updating $Bitmap file ...
Updating Boot record ...
Syncing device ...
Successfully resized NTFS on device '/dev/sda2'.
udisks
  • 1 个回答
  • 1354 Views
Martin Hope
kubusb
Asked: 2025-04-08 16:53:28 +0800 CST

使用 LUKS 加密我的笔记本电脑后,Snap 应用程序停止工作

  • 5

问题描述

使用 LUKS 加密我的 Ubuntu 24.10(Oracular Oriole)笔记本电脑后,我遇到了以下问题:

  1. 有些应用程序根本无法启动,尤其是那些通过 snap 安装的应用程序
  2. 单击应用程序图标(如 Ubuntu App Center/Snap Store)时,没有任何反应
  3. 尝试从命令行安装 Snap Store 时出现错误:cannot locate base snap core22: No such file or directory

您可以使用以下命令检查系统上安装了哪些核心包:

snap list | grep core

Snap 版本

$ snap --version
snap    2.67.1+24.10
snapd   2.67.1+24.10
series  16
ubuntu  24.10
kernel  6.11.0-21-generic

系统信息

  • Ubuntu 24.10(Oracular Oriole)
  • 使用 LUKS 进行全盘加密
  • 安装了几个 snap 应用程序(Firefox、Signal Desktop 等)

根本原因分析

调查发现了多个相关问题:

  1. 交换设置失败/etc/fstab:加密后, ( )中引用的交换文件/swap.img不再存在
  2. 核心 snap 损坏:LUKS 加密过程以某种方式损坏或破坏了核心 snap 包(core20、core22、core24),这些包是其他 snap 应用程序所依赖的基本 snap 包

snap list虽然使用和检查时核心 snap 包似乎已正确安装和挂载mount | grep snap,但它们无法正常运行,从而阻止应用程序启动。

snap
  • 1 个回答
  • 28 Views
Martin Hope
Piyush Jain
Asked: 2025-04-08 15:42:17 +0800 CST

无法从 Windows 访问在 Ubuntu 上运行的服务

  • 5

简而言之:我在 9000 端口上运行着一个服务,我可以通过 Go 应用程序在本地 (127.0.0.1:9000) 连接到它,但无法从另一台机器 (192.168.0.136:9000) 连接到它。两台电脑之间可以 ping 通,而且 UFW 中的 9000 端口是开放的。

编辑 1:即使我禁用 UFW,也无法访问该服务。

我是 Linux 和网络新手。我有一台运行 Ubuntu 24.04.2.LTS 的笔记本电脑,它通过 Wi-Fi 连接到我的家用路由器。我还有一台 Windows 11 台式机(通过以太网)连接到同一个路由器。

在 Ubuntu 上运行 ifconfig 得到:(我只复制了我认为相关的部分)

wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.136  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::ddd9:be4c:f345:fe99  prefixlen 64  scopeid 0x20<link>
        ether 28:a0:6b:0d:68:2b  txqueuelen 1000  (Ethernet)
        RX packets 25308  bytes 12372387 (12.3 MB)
        RX errors 0  dropped 800  overruns 0  frame 0
        TX packets 11271  bytes 5198621 (5.1 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

在 Windows 上运行 ipconfg 会得到:(我只复制了我认为相关的部分)


   Connection-specific DNS Suffix  . : home
   Link-local IPv6 Address . . . . . : fe80::249e:fcf2:6e8f:99d0%6
   IPv4 Address. . . . . . . . . . . : 192.168.0.46
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.0.1

我的 Ubuntu 笔记本电脑上运行着Clickhouse服务,我正尝试通过 Windows 桌面上运行的 Go 应用程序访问它。我不断收到错误:panic: dial tcp 192.168.0.136:9000: connectex: 无法建立连接,因为目标计算机主动拒绝了它。

我确信Clickhouse 在 9000 端口上运行正常,因为我在 Ubuntu 笔记本上直接运行 Go 代码时能够连接到它。两种情况下的 conn 字符串都可以在这里找到。

我可以从 Ubuntu 电脑 ping 通 Windows 电脑,反之亦然。但是,我无法从 Windows 电脑 ping 通端口 9000。我在 Windows 上使用 PsTools 中的 PsPing。

我已经验证了 UFW 中的端口已打开:netstat -tulpn

如何从我的 Windows 计算机访问此 Clickhouse 服务?

networking
  • 1 个回答
  • 26 Views
上一页
下一页

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve