我对 Debian 软件包版本顺序有点困惑。
看看下面两个 Debian 软件包版本,为什么第一个版本<=
比第二个版本高?
0-emacs-29.1.90~202401142128~ubuntu20.04.1
0-emacs-28.3-rc1~202302201437~ubuntu20.04.1
我认为 29 > 28 所以第一个应该是最近的,不是吗?
我对 Debian 软件包版本顺序有点困惑。
看看下面两个 Debian 软件包版本,为什么第一个版本<=
比第二个版本高?
0-emacs-29.1.90~202401142128~ubuntu20.04.1
0-emacs-28.3-rc1~202302201437~ubuntu20.04.1
我认为 29 > 28 所以第一个应该是最近的,不是吗?
第一次使用 KUbuntu (22.04.1 LTS);以前用过Mate & LUbuntu,fcitx
中文输入一直没问题。然而,
使用 KUbuntu 22.04.1 LTS,我的fcitx
中文输入无法立即使用——我根本无法触发它。
这证明我的fcitx
中文输入法安装没问题。
fcitx
相关进程(由 标识ps -eaf --width 200 | grep [f]citx
):
/usr/bin/dbus-daemon --syslog --fork --print-pid 5 --print-address 7 --config-file /usr/share/fcitx/dbus/daemon.conf
/usr/bin/fcitx-dbus-watcher unix:abstract=/tmp/dbus-tW4A6FKmPk,guid=e64c862b67b86932863ee75863f14a15 5504
fcitx
fcitx
在下面手动重新开始LANG=zh_CN.utf8 urxvt -ls &
更新:IBus Pannel
——我的 KUbuntu 22.04.1 启动时任务栏上也有一个图标,quit
每次启动后我都必须手动打开它。
所以这让我怀疑fcitx
我的 KDE 启动的设置有误,我正试图修复这个问题。(我的正常(桌面)工作环境是英语,使用LANG=C
. Thefcitx
仅用于/用于在 LANG='zh_CN.utf8' 环境下/使用 LANG='zh_CN.utf8' 环境启动的任何应用程序,如rxvt-unicode
chrome 等)
如何解决?请帮忙。
$ im-config -m
default
missing
ibus
ibus
$ LANG=C im-config -m
default
missing
ibus
ibus
$ LANG=C im-config -m | tail -3 | hexdump -C
00000000 69 62 75 73 0a 0a 69 62 75 73 0a |ibus..ibus.|
$ LANG='zh_CN.utf8' im-config -m
default
missing
ibus
fcitx5
ibus
最后更新:
我找到了同时安装 ibus 和 fcitx 的根本原因。这就是为什么首先是一个坏主意的原因:
我之所以同时安装这两种输入法是因为zoom
我需要使用,从这两个页面中我可以看出这样的要求是真的没有必要:
以下是一些引述:
- 用于下载 zoom 的 .deb 文件在“Depends:”字段中随 ibus 一起提供。对于许多 Debian/Ubuntu 用户来说,这是一个问题,我将尝试解释原因。
- 不用说,到目前为止,我对 Zoom 回应我的请求的方式感到非常失望。
- 我正在维护 Debian 和 Ubuntu 中使用的工具 (im-config),以便于配置输入法,例如 IBus。正是在这个角色中,我收到了关于 Zoom .deb 文件中 ibus 依赖性的投诉,我就是在这个角色中出现的。
- 我是 [email protected](我的官方 Debian 联系地址),他是维护 Debian 的 ibus 软件包的核心成员。(Gunnar 也是另一位核心成员。他积极参与 Ubuntu 方面的工作。)
- 他的请求不仅仅是“用户请求”。这应该被视为 GNU/Linux 发行版对 ZOOM 的要求。
- 如果 Zoom 为 Debian/Ubuntu (deb-packages) 提供了技术上合理的内容,ZOOM 应该听取我们的意见。
- 关于这方面的任何更新?刚刚安装了 zoom,也得到了这个。这种依赖很烦人而且毫无价值
- 这个“在远程机器上进行远程控制”的借口可悲地缺乏理解“Depends:”字段应该如何用于 Debian 软件包。这应该只用于在所有安装环境下都需要的包。针对特定环境执行此操作被认为是粗鲁的工程。
- 我是一名 Debian 开发人员,因此熟悉 Debian 软件包(又名“.deb”文件)的约定和要求。按照目前的定义,Zoom Debian 包使用关系字段(例如 Depends:)的方式违反了 Debian 打包政策,概述如下:7. 声明包之间的关系 — Debian 政策手册 v4.6.1.1
然而所有的请求都被置若罔闻,1个月后,“这个话题在最后一次回复后30天自动关闭。不再允许新的回复。” 结果来自链接 2 的评论:
- Zoom Debian Linux 软件包需要 ibus。但 ibus 是 GNOME 桌面的一部分。因此,在 KDE Plasma 下安装 zoom_amd64.deb 会破坏键盘支持,因为 ibus 和相关依赖项在 KDE 下不起作用。
- 是的,我正在安装新的 Zoom 并突然依赖 ibus、libegl1-mesa、libxcb、python3-ibus、ibus-gtk 和其他几个。我使用的是几个月前的 Linux 发行版,因此没有理由无法安装 Zoom。我不需要 ibus,它会破坏我的设置。这太疯狂了。. . 当像 Zoom 这样价值数十亿美元的巨人聘请低于标准的开发人员来打包他们的软件时,这可以说是软件公司中最重要的工作——他们活该失败!我阅读了关于同一主题的支持论坛,支持人员完全无法理解这个问题的重要性,这令人难以置信。ibus 的 Debian 维护者发帖试图提供帮助,但 Zoom 工作人员忽略了他们。我认为这是 Zoom 的一次巨大失败,也是对各地 Linux 用户的一记耳光。
我曾经将contrib
&添加non-free
到我的 apt 资源中,但发现它们已经从 jammy 中消失了:
$ sudo apt update
W: Skipping acquire of configured file 'contrib/binary-amd64/Packages' as repository 'http://archive.ubuntu.com/ubuntu jammy InRelease' doesn't have the component 'contrib' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'non-free/binary-amd64/Packages' as repository 'http://archive.ubuntu.com/ubuntu jammy InRelease' doesn't have the component 'non-free' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'contrib/binary-amd64/Packages' as repository 'http://archive.ubuntu.com/ubuntu jammy-updates InRelease' doesn't have the component 'contrib' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'non-free/binary-amd64/Packages' as repository 'http://archive.ubuntu.com/ubuntu jammy-updates InRelease' doesn't have the component 'non-free' (component misspelt in sources.list?)
然后,如何解决常见问题,例如:
E: Package 'rar' has no installation candidate
E: Package 'unrar' has no installation candidate
$ cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ jammy main contrib non-free restricted universe
deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main contrib non-free restricted universe
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
如何在启动时禁用 zram?
我发现的主要是
swapoff -a
rmmod zram
但重启后它又回来了
我发现在不同的地方会问这样的问题,例如,
但似乎没有一个能够得到正确的回答。
我有fcitx
我相信的所有包裹:
fcitx_1:4.2.9.8-3
fcitx-bin_1:4.2.9.8-3
fcitx-config-common_0.4.10-3
fcitx-config-gtk_0.4.10-3
fcitx-data_1:4.2.9.8-3
fcitx-frontend-all_1:4.2.9.8-3
fcitx-frontend-gtk2_1:4.2.9.8-3
fcitx-frontend-gtk3_1:4.2.9.8-3
fcitx-frontend-qt5:amd64_1.2.5-1ubuntu2
fcitx-googlepinyin:amd64_0.1.6-4build1
fcitx-module-dbus_1:4.2.9.8-3
fcitx-module-kimpanel_1:4.2.9.8-3
fcitx-module-lua_1:4.2.9.8-3
fcitx-module-x11_1:4.2.9.8-3
fcitx-modules_1:4.2.9.8-3
fcitx-ui-classic_1:4.2.9.8-3
fcitx5-module-quickphrase-editor:amd64_1.2.5-1ubuntu2
libfcitx-config4:amd64_1:4.2.9.8-3
libfcitx-core0:amd64_1:4.2.9.8-3
libfcitx-gclient1:amd64_1:4.2.9.8-3
libfcitx-qt5-1:amd64_1.2.5-1ubuntu2
libfcitx-qt5-data_1.2.5-1ubuntu2
libfcitx-utils0:amd64_1:4.2.9.8-3
但我的 fcitx 配置仍然显示空方法:
我都试过了fcitx-config-gtk3
和fcitx-configtool
。两者都显示空方法。
因此,使用热键尝试调用/触发fcitx
根本没有效果。
有人可以帮忙吗?
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 21.10
Release: 21.10
Codename: impish
为什么我无法更改挂载 ntfs 驱动器的所有权?
我在我的文件中给出uid=1000,gid=1000,
了 etc /etc/fstab
,但发现它不起作用。所以我在命令行上测试它:
root@host:~# mount | grep /mnt/tmp1 | wc
0 0 0
root@host:~# mount -o uid=1000 /dev/nvme0n1p4 /mnt/tmp1/
root@host:~# mount | grep /mnt/tmp1
/dev/nvme0n1p4 on /mnt/tmp1 type fuseblk (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
root@host:~# umount /mnt/tmp1
root@host:~# mount -o user_id=1000 /dev/nvme0n1p4 /mnt/tmp1/
root@host:~# mount | grep /mnt/tmp1
/dev/nvme0n1p4 on /mnt/tmp1 type fuseblk (rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 21.10
Release: 21.10
Codename: impish
$ apt-cache policy mount
mount:
Installed: 2.36.1-8ubuntu1
Candidate: 2.36.1-8ubuntu2
Version table:
2.36.1-8ubuntu2 500
500 http://archive.ubuntu.com/ubuntu impish-updates/main amd64 Packages
*** 2.36.1-8ubuntu1 500
500 http://archive.ubuntu.com/ubuntu impish/main amd64 Packages
100 /var/lib/dpkg/status
我错过了什么吗?(这是 Ubuntu 21.10 impish)
为什么我不能更改挂载 ntfs 驱动器的所有权?
跟进可能在预置文件中使用变量?和https://help.ubuntu.com/lts/installation-guide/s390x/apbs02.html,其中说:
除了指定 url,您还可以指定不直接影响 debian-installer 本身行为的设置,但可以传递给使用 preseed/run 在加载的 preseed 文件中指定的脚本。目前,唯一的例子是 auto-install/classes,它有一个别名 classes。这可以这样使用:
auto url=example.com classes=class_A;class_B
例如,这些类可以表示要安装的系统类型或要使用的本地化。
所以假设我在引导提示符下输入了以下内容:
auto url=example.com classes=class_A;class_B
如何利用传入classes
的我的预置文件?
我刚刚发现 chromium 在我的 Ubuntu 20.04 中作为 snap 包发布,我想知道还有什么是这样的。所以,
如何判断哪些包来自 snap?即,我想要一个在尝试使用 APT 安装时实际安装 Snaps 的软件包列表。
从“ sudoers 添加用户后是否需要重启? ” 可以看出重启sudo服务是必要的,还是重启。但是,适用于 Ubuntu 14.04 的推荐方式不再适用于 Ubuntu 18+:
$ sudo service sudo restart
Failed to restart sudo.service: Unit sudo.service is masked.
解决方案?
sudo
配置以保留SSH_AUTH_SOCK
环境变量的正确方法是什么?
我在互联网上遵循一些指南,但它对我不起作用:
$ printenv | grep SSH
SSH_AUTH_SOCK=/tmp/ssh-Zy2v8uDtJxPw/agent.2628
SSH_AGENT_PID=2629
$ sudo printenv | grep SSH | wc
0 0 0
我以为我需要重新启动sudo
服务,但是
如何在 Ubuntu 16.10 上重新启动 Sudo 服务说不需要。
按照@mook765,跟进将 Grub2 安装到 PBR,并打开一个新问题以提供引导信息摘要的链接:
http://paste.ubuntu.com/p/SnT6Tcdmqk/
问题又来了:
% grub-install /dev/sdc5
Installing for i386-pc platform.
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists
即,grub-install
拒绝继续使用阻止列表,说“文件系统'ext2'不支持嵌入”。但是,我的不是ext2
文件系统,而是ext4
,它不需要 fsck:
$ mount | grep /dev/sdc5
/dev/sdc5 on /mnt/osp type ext4 (rw,noatime,nodiratime,data=ordered)
% umount /dev/sdc5
umount: /dev/sdc5: not mounted.
% fsck.ext4 /dev/sdc5
e2fsck 1.44.1 (24-Mar-2018)
osp: clean, 115049/513072 files, 897251/2048287 blocks
为了您的方便,这里是 boot-info-summary 中的相关部分:
sdc5: __________________________________________________________________________
File system: ext4
Boot sector type: Grub2 (v1.99-2.00)
Boot sector info: Grub2 (v1.99-2.00) is installed in the boot sector of
sdc5 and looks at sector 34172346 of the same hard
drive for core.img, but core.img can not be found at
this location.
Operating System: Ubuntu 18.04.2 LTS
Boot files: /boot/grub/grub.cfg /etc/fstab
/boot/extlinux/extlinux.conf
/boot/grub/i386-pc/core.img
修正:
好吧,让我解释一下我的配置。
lilo
来启动我的系统。我放入 mbr 的唯一原因lilo
是,它具有能够直接从扩展分区引导的优点,而不是仅从主分区引导。*
在fdisk -l
输出中显示为“”,这要归功于 mbr 中的 lilo。事实上,任何普通的 MBR 都可以,因为我所有的活动分区都是主分区,而不是扩展分区。但我只是保持我的选择开放。extlinux
. 从那里,我从它的启动菜单链接加载我想要启动的任何内容。extlinux
,但不知怎的,我无法通过/dev/sdc5
引导extlinux
,所以我切换到grub2
,它之前一直可以正常引导。extlinux
,我怀疑,但无法证明。如何删除系统语言环境,与如何删除不必要的语言环境??
我最近收到以下错误:
locale: Cannot set LC_ALL to default locale: No such file or directory
我系统中唯一的语言环境: en
$ grep -r en /var/lib/locales/supported.d/*
/var/lib/locales/supported.d/local: en_US ISO-8859-1
/var/lib/locales/supported.d/local: en_US.UTF-8 UTF-8
$ locale -a | grep en
en_US
en_US.iso88591
en_US.utf8
但不是en
,正如抱怨的那样perl
:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "",
LC_ALL = (unset),
LC_MEASUREMENT = "en",
LC_PAPER = "en",
LC_MONETARY = "en",
LC_NAME = "en",
LC_ADDRESS = "en",
LC_NUMERIC = "en",
LC_TELEPHONE = "en",
LC_IDENTIFICATION = "en",
LC_TIME = "en",
LANG = "C"
所以我通过以下方式添加语言环境 en
:
% locale-gen en
Generating locales (this might take a while)...
en_AG.UTF-8... done
en_AU.UTF-8... done
en_BW.UTF-8... done
en_CA.UTF-8... done
en_DK.UTF-8...^C
我不想要上述任何语言环境(仅en_US
),但现在我无法摆脱它们——我按照
https://serverfault.com/questions/394610/remove-a-locale-in-中的步骤操作ubuntu
但是当谈到最后一步时,我仍然得到:
% locale-gen
Generating locales (this might take a while)...
en_AG.UTF-8... done
en_AU.UTF-8... done
en_BW.UTF-8... done
en_CA.UTF-8... done
en_DK.UTF-8...^C
如何删除所有上述语言环境并仅保留en_US
?
结论与补充
/etc/locale.gen
感谢 Gunnar 的回答,对于那些额外的语言环境,它确实是由 , 中的条目引起的。只是 FTR,这就是发生locale-gen en
的变化/etc/locale.gen
:
$ sed '/^#/d; /en/p;' /etc/locale.gen
en_AG UTF-8
en_AG UTF-8
en_AU.UTF-8 UTF-8
en_AU.UTF-8 UTF-8
en_BW.UTF-8 UTF-8
en_BW.UTF-8 UTF-8
en_CA.UTF-8 UTF-8
en_CA.UTF-8 UTF-8
en_DK.UTF-8 UTF-8
en_DK.UTF-8 UTF-8
en_GB.UTF-8 UTF-8
en_GB.UTF-8 UTF-8
en_HK.UTF-8 UTF-8
en_HK.UTF-8 UTF-8
en_IE.UTF-8 UTF-8
en_IE.UTF-8 UTF-8
en_IL UTF-8
en_IL UTF-8
en_IN UTF-8
en_IN UTF-8
en_NG UTF-8
en_NG UTF-8
en_NZ.UTF-8 UTF-8
en_NZ.UTF-8 UTF-8
en_PH.UTF-8 UTF-8
en_PH.UTF-8 UTF-8
en_SC.UTF-8 UTF-8
en_SC.UTF-8 UTF-8
en_SG.UTF-8 UTF-8
en_SG.UTF-8 UTF-8
en_US.UTF-8 UTF-8
en_US.UTF-8 UTF-8
en_ZA.UTF-8 UTF-8
en_ZA.UTF-8 UTF-8
en_ZM UTF-8
en_ZM UTF-8
en_ZW.UTF-8 UTF-8
en_ZW.UTF-8 UTF-8
作为比较,这是默认的样子(即,没有上述任何额外的语言环境):
$ sed '/^#/d;' /etc/locale.gen; echo ---
---
debootstrap
是将 Debian/Ubuntu 基础系统安装到另一个已安装系统的子目录中的工具。
安装日志结束如下:
. . .
I: Validating xxd 2:8.1.0320-1ubuntu3
I: Validating xz-utils 5.2.4-1
I: Validating zlib1g 1:1.2.11.dfsg-1ubuntu2
I: Chosen extractor for .deb packages: dpkg-deb
I: Extracting base-files...
所以在我看来,唯一的包debootstrap
提取是base-files
,对吧?
有没有办法debootstrap
提取/安装更多的包?特别是,我发现debootstrap
根本没有安装 linux 内核。我可以以某种方式让debootstrap
安装 linux 内核吗?
我的 NetworkManager 没有写入/var/run/networkmanager/resolv.conf
并且NetworkManager 没有填充 resolv.conf不是我的情况的答案,因为我不使用resolvconf
. 更多详情如下:
我将管理我的以太网从 NetworkManager 切换/etc/network/interfaces
到了 NetworkManager,它以某种方式永远不会写入/var/run/networkmanager/resolv.conf
:
$ nmcli d
DEVICE TYPE STATE CONNECTION
eth0 ethernet connected Wired connection 1
lo loopback unmanaged --
$ ls /var/run/NetworkManager/resolv.conf
ls: cannot access '/var/run/NetworkManager/resolv.conf': No such file or directory
$ ls /var/run/nm-dns-dnsmasq.conf
ls: cannot access '/var/run/nm-dns-dnsmasq.conf': No such file or directory
当我/etc/network/interfaces
使用resolv.conf
.
这是我的NetworkManager.conf
:
cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile
dns=dnsmasq
[ifupdown]
managed=false
[device]
wifi.scan-rand-mac-address=no
有些答案说我应该dns=dnsmasq
在那里,但有些人说我不应该。总而言之,我仍然对如何更新 NetworkManager 感到困惑/var/run/networkmanager/resolv.conf
。
更新,更多信息:
$ resolvectl status | grep DNS
-su: resolvectl: command not found
$ dpkg -l '*dns*' | grep 'ii *dns'
ii dns-root-data 2018013001 all DNS root data including root zone
ii dnsmasq 2.79-1 all Small caching DNS proxy and DHCP/
ii dnsmasq-base 2.79-1 amd64 Small caching DNS proxy and DHCP/
ii dnsutils 1:9.11.3+dfs amd64 Clients provided with BIND
$ dpkg -l '*resolv*' | grep ii || echo no resolvconf
no resolvconf
$ ls -al /etc/resolv.conf
-rw-r--r-- 1 root root 79 2019-03-03 18:42 /etc/resolv.conf
$ host 8.8.8.8
8.8.8.8.in-addr.arpa domain name pointer google-public-dns-a.google.com.
$ host www.ebay.com
www.ebay.com is an alias for slot9428.ebay.com.edgekey.net.
slot9428.ebay.com.edgekey.net is an alias for e9428.b.akamaiedge.net.
e9428.b.akamaiedge.net has address 104.93.181.25
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
更新2。
resolvconf
自己,因为我正在使用/etc/network/interfaces
,并且不希望我/etc/resolv.conf
一直在改变。也许这就是罪魁祸首,NetworkManager 不能没有resolvconf
?resolvconf
),并将其用于我的 LAN DNS 服务器。嗯,也许在那种情况下,我不需要 NetworkManager 一直在改变我/etc/resolv.conf
的。无论如何,以下是进一步调查的信息:
$ dpkg -l '*resolv*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
un resolvconf <none> <none> (no description available)
$ cat /run/resolvconf/resolv.conf
cat: /run/resolvconf/resolv.conf: No such file or directory
$ cat /run/systemd/resolve/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
. . .
nameserver 64.71.255.204
nameserver 64.71.255.198
search hitronhub.home
$ cat /etc/netplan/*.yaml
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
ethernets:
eth0:
addresses: [192.168.0.11/24, 192.168.0.10/24]
gateway4: 192.168.0.1
$ ps auxc | grep resolv
systemd+ 23890 0.0 0.0 70608 1520 ? Ss Mar01 0:00 systemd-resolve
$ sudo lsof -i tcp:53
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
systemd-r 23890 systemd-resolve 13u IPv4 47127798 0t0 TCP 127.0.0.53:domain (LISTEN)
dnsmasq 29822 dnsmasq 5u IPv4 47935969 0t0 TCP 192.168.0.10:domain (LISTEN)
dnsmasq 29822 dnsmasq 7u IPv4 47935971 0t0 TCP 192.168.0.11:domain (LISTEN)
dnsmasq 29822 dnsmasq 9u IPv4 47935973 0t0 TCP localhost.myhost.org:domain (LISTEN)
dnsmasq 29822 dnsmasq 11u IPv6 47935975 0t0 TCP [fe80::xxxx]:domain (LISTEN)
dnsmasq 29822 dnsmasq 13u IPv6 47935977 0t0 TCP [2607:fea8:xxxx]:domain (LISTEN)
dnsmasq 29822 dnsmasq 15u IPv6 47935979 0t0 TCP [fd00:xxxx]:domain (LISTEN)
dnsmasq 29822 dnsmasq 17u IPv6 47935981 0t0 TCP ip6-localhost:domain (LISTEN)