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
Amanda
Asked: 2024-10-17 13:07:21 +0800 CST

如何解决“无法写入… dnsmasq.leases”问题?

  • 5

一台运行 Ubuntu 22.04 LTS 的笔记本电脑无法连接到 WiFi 路由器。在路由器的日志中,我看到以下内容:

Oct 16 20:52:54 wlceventd: wlceventd_proc_event(645): wl0.1: Deauth_ind 28:B2:BD:5D:75:73, status: 0, reason: Previous authentication no longer valid (2), rssi:-66
Oct 16 20:53:32 dnsmasq-dhcp[15695]: failed to write /var/lib/misc/dnsmasq.leases: No space left on device (retry in 60s)
Oct 16 20:54:32 dnsmasq-dhcp[15695]: failed to write /var/lib/misc/dnsmasq.leases: No space left on device (retry in 60s)

笔记本电脑有11G的空闲空间,这是路由器的问题还是笔记本电脑的问题?

networking
  • 1 个回答
  • 35 Views
Martin Hope
floogy
Asked: 2024-10-17 07:27:02 +0800 CST

由于 usrmerge 和 Smartmatch,do-release-grade 失败

  • 5

我无法从 22.04 升级到 24.04.1,因为 do-release-upgrade 停止并且声称 usr 未合并。

但是如果我以 root 身份运行 usrmerge,它会出现一条消息,表明已成功合并 usr。

但还是有错误。我以为它可能会以 exit 1 退出,但事实似乎并非如此。echo $? 返回 0。

我创建了一个包装脚本,它调用 usrmerge 并以 0 退出。但 do-release-upgrade 仍然失败,声称 usr 未合并,我应该安装包 usrmerge 来解决这个问题。

$ sudo LANG=C do-release-upgrade
  Checking for a new Ubuntu release

  = Welcome to Ubuntu 24.04 LTS 'Noble Numbat' =
   
  [...]
  
  Reading state information... Done

  Cannot upgrade system with unmerged /usr 

  Please install the usrmerge package to fix this, and then try the 
  upgrade again. 


  Restoring original system state

  Aborting
  Reading package lists... Done    
  Building dependency tree... Done 
  Reading state information... Done
  === Command detached from window (Thu Oct 17 23:28:58 2024) ===
  === Command terminated with exit status 1 (Thu Oct 17 23:29:08      2024) ===

我编写了一个包装脚本,但是它像原始脚本一样返回 0,尽管原始脚本在第 172 行的 Smartmatch 上发出了警告。

$ sudo cat /usr/lib/usrmerge/convert-usrmerge
#!/bin/bash
/usr/lib/usrmerge/convert-usrmerge_bin 2> /dev/null
exit 0

运行包装器

$ sudo LANG=C /usr/lib/usrmerge/convert-usrmerge
The system has been successfully converted.

直接运行 usrmerge 脚本

$ sudo LANG=C /usr/lib/usrmerge/convert-usrmerge_bin
  Smartmatch is experimental at /usr/lib/usrmerge/convert-usrmerge_bin line 172.
  The system has been successfully converted.
$ echo $?
  0

$ LANG=C apt policy usrmerge
usrmerge:
  Installed: 25ubuntu2
  Candidate: 25ubuntu2
  Version table:
 *** 25ubuntu2 500
        500 http://de.archive.ubuntu.com/ubuntu jammy/main amd64  Packages
        500 http://de.archive.ubuntu.com/ubuntu jammy/main i386 Packages
        100 /var/lib/dpkg/status

$ sudo LANG=C sha1sum /usr/lib/usrmerge/convert-usrmerge_bin
ddc18b09fdc448c2d8aa2c94669501500482388e  /usr/lib/usrmerge/convert-usrmerge_bin
$ sudo LANG=C cat -n /usr/lib/usrmerge/convert-usrmerge_bin | egrep '^[[:space:]]*172'
   172      if (-e "/usr$n" && $n ~~ @generated_files) {
$ sudo LANG=C cat -n /usr/lib/usrmerge/convert-usrmerge_bin | egrep -C10 '^[[:space:]]*172'
   162          fatal("Both $n and /usr$n exist");
   163      }
   164  
   165      # generated files
   166      # if it was already re-generated in the new place, clear the legacy location
   167      # Origin of generated files:
   168      # /lib/udev/hwdb.bin -> 'systemd-hwdb --usr update'
   169      my @generated_files = qw(
   170          /lib/udev/hwdb.bin
   171      );
   172      if (-e "/usr$n" && $n ~~ @generated_files) {
   173          rm('-f', "$n");
   174          return;
   175      }
   176  
   177      fatal("$n is a directory and /usr$n is not")
   178          if -d $n and -e "/usr$n";
   179      fatal("/usr$n is a directory and $n is not")
   180          if -d "/usr$n";
   181      fatal("Both $n and /usr$n exist")
   182          if -e "/usr$n";

以下是 strace 输出 https://pastebin.ubuntu.com/p/c3wghnxPJ7/

我编辑了 convert-usrmerge 以避免出现警告,它有效

use lib "/usr/lib/usrmerge/lib";
use warnings;

# https://www.reddit.com/r/perl/comments/60b3tr/ how_to_suppress_experimental_warning_for/
# to solve https://askubuntu.com/questions/1530232/do-release-upgrade-fails-due-to-usrmerge-and-smartmatch
no if $] >= 5.018, warnings =>  "experimental::smartmatch";
use feature "switch";

use strict;
use autodie;

但不幸的是,它并没有解决 do-release-upgrade 声称 usr 没有合并并对此抱怨并且没有启动升级过程的问题。

因此 Smartmatch 似乎不是罪魁祸首。

我不知道如何调试 perlscript,但我还是发布了我的尝试:

$ sudo LANG=C perl -d /usr/lib/usrmerge/convert-usrmerge

Loading DB routines from perl5db.pl version 1.60
Editor support available.

Enter h or 'h h' for help, or 'man perldebug' for more help.

main::(/usr/lib/usrmerge/convert-usrmerge:27):
27: my $Debug = 1;
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:28):
28: my $Program_RC = 0;
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:30):
30: check_free_space();
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:32):
32: go_faster();
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:35):
35: $SIG{__DIE__} = sub { fatal($_[0]); };
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:38):
38:     foreach my $name (early_conversion_files()) {
  DB<1> n
    main::(/usr/lib/usrmerge/convert-usrmerge:38):
38:     foreach my $name (early_conversion_files()) {
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:43):
43:     my @dirs = directories_to_merge();
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:46):
46:     foreach my $dir (@dirs) {
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:47):
47:         mkdir("/usr$dir") if not -e "/usr$dir";
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:47):
47:         mkdir("/usr$dir") if not -e "/usr$dir";
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:47):
47:         mkdir("/usr$dir") if not -e "/usr$dir";
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:47):
47:         mkdir("/usr$dir") if not -e "/usr$dir";
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:47):
47:         mkdir("/usr$dir") if not -e "/usr$dir";
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:47):
47:         mkdir("/usr$dir") if not -e "/usr$dir";
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:50):
50:     my @later;
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:51):
51:     my $rule = File::Find::Rule->mindepth(1)->maxdepth(1)->start(@dirs);
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:52):
52:     while (defined (my $name = $rule->match)) {
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:58):
58:     convert_file($_) foreach @later;
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:60):
60:     verify_links_only($_) foreach @dirs;
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:62):
62:     convert_directory($_) foreach @dirs;
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:64):
64:     exit($Program_RC) if $Program_RC;
  DB<1> n
main::(/usr/lib/usrmerge/convert-usrmerge:65):
65:     print "The system has been successfully converted.\n";
  DB<1> n
The system has been successfully converted.
main::(/usr/lib/usrmerge/convert-usrmerge:66):
66:     exit;
  DB<1> n
Debugged program terminated.  Use q to quit or R to restart,
use o inhibit_exit to avoid stopping after program termination,
h q, h R or h o to get additional info.
  DB<1> q

据我所知 usr 已经合并

    lrwxrwxrwx   1 root    root           7 Jun 24  2022  bin -> usr/bin
    drwxr-xr-x  44 root    root        4096 Okt 16 11:59  boot
    drwxr-xr-x   2 root    root        4096 Okt  2  2012  cdrom
    drwxr-xr-x   3 root    root        4096 Okt 31  2019  custom
    drwxr-xr-x  22 root    root        5720 Okt 17 23:14  dev
    drwxr-xr-x   2 root    root        4096 Aug 29  2021  dracut
    drwxr-xr-x 244 root    root       20480 Okt 17 23:13  etc
    drwxr-xr-x   2 root    root        4096 Dez 19  2019  export
    drwxr-xr-x   6 root    root        4096 Okt 30  2012  export_ofs
    drwxr-xr-x   3 root    root        4096 Okt  2  2012  home
    drwxr-xr-x   2 root    root        4096 Jan 19  2020  images
    lrwxrwxrwx   1 root    root           8 Mai  6 15:35  lib -> /usr/lib
    lrwxrwxrwx   1 root    root           9 Jun 24  2022  lib32 -> usr/lib32
    lrwxrwxrwx   1 root    root           9 Jun 24  2022  lib64 -> usr/lib64
    lrwxrwxrwx   1 root    root          36 Mär 30  2014  libnss3.so -> /usr/lib/x86_64-linux-gnu/libnss3.so
    drwxr-xr-x   3 root    root        4096 Mai  5 01:02  lib-rootfolder
    lrwxrwxrwx   1 root    root          10 Jun 24  2022  libx32 -> usr/libx32
    drwx------   2 root    root       16384 Sep 30  2012  lost+found
    drwxr-xr-x   4 root    root        4096 Jul  2  2022  media
    drwxr-xr-x   8 root    root        4096 Feb 22  2022  mnt
    drwxr-xr-x   3 root    root        4096 Okt 31  2012  net
    drwxr-xr-x   2 root    root        4096 Jan 19  2020  NST
    drwxr-xr-x   5 root    root        4096 Jun 24  2022  opt
    dr-xr-xr-x 413 root    root           0 Okt 17 23:14  proc
    drwx------  17 root    root        4096 Okt 18 14:34  root
    drwxr-xr-x  51 root    root        1560 Okt 18 00:00  run
    lrwxrwxrwx   1 root    root           8 Jun 24  2022  sbin -> usr/sbin
    drwxr-xr-x  38 root    root        4096 Aug 10 17:54  snap
    drwxr-xr-x   2 root    root        4096 Apr 25  2012  srv
    dr-xr-xr-x  13 root    root           0 Okt 17 23:14  sys
    drwxrwxrwt  26 root    root       12288 Okt 18 14:45  tmp
    drwxr-xr-x  17 root    root        4096 Jun 24  2022  usr
    drwxr-xr-x  15 root    root        4096 Jun  3  2018  var
    drwxr-xr-x   2 root    root        4096 Sep  2  2020  zfspool
    $ ls -l /usr
    insgesamt 324
    drwxr-xr-x   2 root root 135168 Okt 17 23:13 bin
    drwxr-xr-x   2 root root   4096 Okt 17 23:09 games
    drwxr-xr-x   3 root root   4096 Jun 24  2022 i686-w64-mingw32
    drwxr-xr-x 105 root root  20480 Okt 14 14:33 include
    drwxr-xr-x 203 root root  57344 Okt 16 12:33 lib
    drwxr-xr-x   3 root root   4096 Jun 26 15:18 lib32
    drwxr-xr-x   3 root root   4096 Jun 26 15:18 lib64
    drwxr-xr-x  32 root root  12288 Okt 14 14:34 libexec
    drwxr-xr-x   2 root root   4096 Jun 24  2022 libx32
    drwxr-xr-x  12 root root   4096 Mai 21  2022 local
    drwxr-xr-x   3 root root   4096 Jul 31  2016 locale
    drwxr-xr-x   2 root root  32768 Okt 16 11:59 sbin
    drwxr-xr-x 555 root root  20480 Okt 17 23:09 share
    drwxr-xr-x  19 root root   4096 Okt 16 11:50 src
    drwxr-xr-x   3 root root   4096 Jun 24  2022 x86_64-w64-mingw32

我希望有人知道解决方法。

我只看到手动更新我的 sources.list 并进行升级而没有 do-release-upgrade,因为 usrmerge 说 usr 已成功转换而 do-release-upgrade 说相反,我不明白为什么。

短暂性脑缺血发作

弗洛吉

do-release-upgrade
  • 1 个回答
  • 42 Views
Martin Hope
cmorris
Asked: 2024-10-16 23:42:33 +0800 CST

更新后 ipv4 自动配置失效

  • 5

经过一次看似无害的更新后,我的Ubuntu 22.04.5 LTS系统不再在以太网或 wifi 接口上自动配置 ipv4 网络。Ipv6 工作正常,手动配置 ipv4 也正常。

以下是有问题的更新的历史记录:

libpskc0:amd64 (2.6.7-3build1, 2.6.7-3ubuntu0.1),
cups-filters:amd64 (1.28.15-0ubuntu1.3, 1.28.15-0ubuntu1.4), 
ovmf:amd64 (2022.02-3ubuntu0.22.04.2, 2022.02-3ubuntu0.22.04.3),
google-chrome-stable:amd64 (129.0.6668.70-1, 129.0.6668.100-1),
ubuntu-advantage-desktop-daemon:amd64 (1.10~22.04.1, 1.10.ubuntu0.22.04.2),
libfontembed1:amd64 (1.28.15-0ubuntu1.3, 1.28.15-0ubuntu1.4),
cups-filters-core-drivers:amd64 (1.28.15-0ubuntu1.3, 1.28.15-0ubuntu1.4),
nodejs:amd64 (20.17.0-1nodesource1, 20.18.0-1nodesource1),
cups-browsed:amd64 (1.28.15-0ubuntu1.3, 1.28.15-0ubuntu1.4),
brave-browser:amd64 (1.70.119, 1.70.126),
code:amd64 (1.93.1-1726079302, 1.94.2-1728494015),
kubectl:amd64 (1:494.0.0-0, 1:496.0.0-0),
libcupsfilters1:amd64 (1.28.15-0ubuntu1.3, 1.28.15-0ubuntu1.4),
ruby-webrick:amd64 (1.7.0-3, 1.7.0-3ubuntu0.1)

我尝试回滚libpskc0,但nodejs无济于事。以前的版本ovmf在存储库中不可用。

这是一个有效的手动配置(/etc/NetworkManager/system-connections/Wired\ connection\ 1.nmconnection):

[connection]
id=Wired connection 1
uuid=a9d94420-f026-3f3f-bfdd-8142ae130e71
type=ethernet
autoconnect-priority=-100

[ethernet]

[ipv4]
address1=192.168.0.123/24,192.168.0.1
dns=8.8.8.8;
method=manual

[ipv6]
addr-gen-mode=stable-privacy
method=auto

[proxy]

还有一个不会自动运行的:

[connection]
id=Wired connection 1
uuid=a9d94420-f026-3f3f-bfdd-8142ae130e71
type=ethernet
autoconnect-priority=-100

[ethernet]

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=auto

[proxy]

ifconfig以下是自动配置不起作用的结果:

enx089204536db9: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 2601:207:680:29e2:d864:1ed3:f424:6a31  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::b92c:2b5:5510:e58b  prefixlen 64  scopeid 0x20<link>
        inet6 2601:207:680:29e2:fb45:144e:3353:9272  prefixlen 64  scopeid 0x0<global>
        ether 08:92:04:53:6d:b9  txqueuelen 1000  (Ethernet)
        RX packets 40433  bytes 39759055 (39.7 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 18507  bytes 7483707 (7.4 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 16119  bytes 1722379 (1.7 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 16119  bytes 1722379 (1.7 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:78:d9:8c  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp0s20f3: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 4c:03:4f:c3:f5:5f  txqueuelen 1000  (Ethernet)
        RX packets 23  bytes 6925 (6.9 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 33  bytes 6203 (6.2 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

有没有想过是什么原因导致了这种情况?如何解决?我不介意手动配置有线连接,但这是一台笔记本电脑,每次连接新的 wifi 时都这样做会非常麻烦。

感谢您的帮助。

22.04
  • 1 个回答
  • 17 Views
Martin Hope
Factor Three
Asked: 2024-10-16 07:43:16 +0800 CST

Ubuntu 24.04 启动安装在 systemd 上挂起

  • 5

我正在尝试将 Ubuntu 24.04 安装到一台新台式电脑上。安装过程非常奇怪。

似乎发生的情况是,systemd 在启动其一项服务后挂起了系统。基本上,我看到它在以下行之后停止:

     starting systemd_rfkill.service - Load/Save RF Kill switch status
[OK] started systemd_rfkill.service - Load/Save RF Kill switch status

然后系统就冻结了。安装系统没有启动,事实上我唯一能做的就是关闭或重启电脑。

还有人见过这个问题吗?如果是这样,你有办法解决这个问题吗?

编辑以回答 oldfred 的问题:

CPU 是最新的 Ryzen 7 之一。CPU 主板有 64G 内存。主磁盘是 4Tb SSD。屏幕由 Nvidia 主板供电

有趣的是:发布此问题后,我成功地在系统上安装了 Ubuntu V22.04 服务器。然后我从 22.04 升级到 24.04。不幸的是,升级后系统重新启动 - 然后它在相同的 systemd 行之后冻结。

boot
  • 1 个回答
  • 71 Views
Martin Hope
Borea Deitz
Asked: 2024-10-16 03:49:21 +0800 CST

创建用户后是否可以创建主文件夹?

  • 5

我刚刚安装了 Ubuntu 24.04,但遇到了没有任何通知就发生变化的问题。

在 Ubuntu 20.04 上,当我使用创建系统用户时adduser,它会为该用户创建一个主文件夹:

$ sudo adduser --system --group barney
Adding system user `barney' (UID 114) ...
Adding new group `barney' (GID 119) ...
Adding new user `barney' (UID 114) with group `barney' ...
Creating home directory `/home/barney' ...

现在,在 Ubuntu 24.04 中,完全相同的命令突然以不同的方式工作:

$ sudo adduser --system --group barney
info: Selecting UID from range 100 to 999 ...

info: Selecting GID from range 100 to 999 ...
info: Adding system user `barney' (UID 112) ...
info: Adding new group `barney' (GID 112) ...
info: Adding new user `barney' (UID 112) with group `barney' ...
info: Not creating `/nonexistent'.

没有创建主文件夹。好吧,这不过是使用 Linux 时我所遇到的上千种麻烦之一,我已经对此习以为常了。

我可以通过手动添加/home/barney/目录来更正此问题吗?也就是说,如果我运行

$ sudo mkdir /home/barney
$ sudo chown barney:barney /home/barney
$ sudo chmod 775 /home/barney

/home/barney/这是否与在添加用户时创建的主文件夹完全相同barney,或者是否存在我不知道的进一步复杂情况?

24.04
  • 1 个回答
  • 34 Views
Martin Hope
raphael75
Asked: 2024-10-16 01:17:44 +0800 CST

使用非拉丁字符重命名文件

  • 7

我有 Kubuntu 22.04。*buntu 中是否有程序、脚本等可以将文件夹中所有包含非拉丁字符的文件重命名为拉丁字符?例如,我有一个文件夹,其中包含以下名称的文件:

Andúril
Dúnedain
Éomer

我需要将它们重命名为:

Anduril
Dunedain
Eomer
command-line
  • 2 个回答
  • 423 Views
Martin Hope
Aenye_Cerbin
Asked: 2024-10-16 00:47:18 +0800 CST

升级到 Kubuntu 24.10 后无法从 grub 启动 Windows

  • 7

今天我从 24.04 升级到了 Kubuntu 24.10。更新后,我无法从 GRUB 启动 Windows 10,但仍然可以直接从 UEFI 选择 Windows 启动管理器。

我尝试重新启动sudo update-grub并得到以下结果:

Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found theme: /boot/grub/themes/poly-dark-master/theme.txt
Found linux image: /boot/vmlinuz-6.11.0-8-generic
Found initrd image: /boot/initrd.img-6.11.0-8-generic
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Error: invalid volume.
grub-probe: error: cannot find GRUB device for /dev/sdc1. Please check device.map.
Found Windows Boot Manager on /dev/nvme0n1p1@/efi/Microsoft/Boot/bootmgfw.efi
Found linux image: /boot/vmlinuz-6.11.0-8-generic
Found initrd image: /boot/initrd.img-6.11.0-8-generic
Found memtest86+ 64bit EFI image: /boot/memtest86+x64.efi
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Error: invalid volume.
grub-probe: error: cannot find GRUB device for /dev/sdc1. Please check device.map.
Found Windows Boot Manager on /dev/nvme0n1p1@/efi/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done

重启后,仍然出现同样的情况: error, cannot load image然后返回主 GRUB 菜单,更奇怪的是,我无法启动 kubuntu,直到我重新启动 PC。它只是开始启动它,然后返回主 GRUB 菜单。重启后,我可以正常启动 Kubuntu。

我的 grub 配置/boot/grub/grub.cfg 在这里。

我的 Kubuntu 和 grub 安装在 上/dev/sdb/,/dev/sdc/是 Windows 带区磁盘之一。Windows 位于 上/dev/nvme0n1/。

boot
  • 2 个回答
  • 675 Views
Martin Hope
Neil Meyer
Asked: 2024-10-15 18:09:19 +0800 CST

有没有办法不使用 GUI 来拥有 Awesome Window Manager?

  • 6

我安装了 Budgie 版本的 Ubuntu。我安装了 Awesome Window Manager。没有 GUI 可以使用 Awesome 吗?我的程序还能正常运行吗?

我不仅使用基于文本的终端程序,还使用 ​​Visual Studio Code 之类的东西。您可以只加载 Awesome 并让您的基于图形的程序正常工作吗?还是仅使用 Awesome 只能让您使用基于文本的终端程序?

command-line
  • 1 个回答
  • 58 Views
Martin Hope
fabian
Asked: 2024-10-15 14:40:06 +0800 CST

我怎样才能 (为什么不能) 使用 perf 来跟踪跟踪点?

  • 5

我想跟踪系统范围的跟踪点。Perf 列表告诉我以下跟踪点可用:

  block:block_io_start                               [Tracepoint event]
  block:block_plug                                   [Tracepoint event]
  block:block_rq_complete                            [Tracepoint event]
  block:block_rq_error                               [Tracepoint event]
  block:block_rq_insert                              [Tracepoint event]
...
  power:cpu_frequency                                [Tracepoint event]
  power:cpu_frequency_limits                         [Tracepoint event]
  power:cpu_idle                                     [Tracepoint event]
  power:cpu_idle_miss                                [Tracepoint event]

我知道我应该用

 perf record -e TRACEPOINT -a

用于系统范围的跟踪。但是,我被告知跟踪点是unsupported tracepoint:

perf record -e block:block_io_start -a      
event syntax error: 'block:block_io_start'
                     \___ unsupported tracepoint

libtraceevent is necessary for tracepoint support
Run 'perf list' for a list of valid events

我安装了所有libtraceevent*软件包。我的内核是:

6.8.0-45-generic #45~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Sep 11 15:25:05 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
kernel
  • 1 个回答
  • 31 Views
Martin Hope
user6790086
Asked: 2024-10-15 12:40:01 +0800 CST

递归地将字幕文件移动到子目录中

  • 12

我目前在运行 ubuntu 的 Beelink 上运行 plex,到目前为止,与每部电影相关的所有文件(电影文件、相关图像和字幕)都在同一个父目录中。大多数情况下这没问题,但对于有多个字幕的电影,可能会变得混乱。例如

    /Movies
       /Avatar (2009)
          Avatar (2009).mkv
          Avatar (2009).eng.srt
          Avatar (2009).en.forced.ass
          Avatar (2009).en.sdh.srt
          Avatar (2009).de.srt
          Avatar (2009).de.sdh.forced.srt

现在看来 plex 会在“subs”或“subtitles”文件夹中找到字幕位置。那么为了整理一下,我该如何递归遍历父电影目录,并针对每个单独的电影文件夹,将所有字幕文件移动到“subtitles”文件夹中,就像这样?

/Movies
   /Avatar (2009)
      Avatar (2009).mkv
      /Subtitles
         Avatar (2009).eng.srt
         Avatar (2009).en.sdh.srt
         Avatar (2009).de.srt
         Avatar (2009).de.sdh.forced.srt

对于电视节目,父文件夹下可能有多个级别,例如

**Old:**


/TV Shows
   /Game Of Thrones
      /Season 02
         Game Of Thrones - s02e03.mp4
         Game Of Thrones - s02e03.eng.srt
         Game Of Thrones - s02e03.en.forced.srt


**New:**
         
TV Shows
   /Game Of Thrones
      /Season 01
         Game Of Thrones - s01e03.mp4
         Game Of Thrones - s01e04.mp4
         /Subtitles
           Game Of Thrones - s01e03.eng.srt
           Game Of Thrones - s01e04.eng.srt
      /Season 02
         Game Of Thrones - s02e03.mp4
         /Subs
           Game Of Thrones - s02e03.eng.srt
           Game Of Thrones - s02e03.en.forced.srt

更好的选择是仅当尚未在字幕文件夹中时才移动......

command-line
  • 2 个回答
  • 367 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