我只想安装某些应用程序的旧版本。我对某些应用程序的旧版本更熟悉,在 Windows 中,你可以在 Ubuntu 中安装旧版 exe 文件,我不知道。
我对 Ubuntu 还很陌生,我对 Ubuntu 的工作原理并不是很了解,当我运行 sudo apt update 或当我想要安装应用程序或添加 repo 时,我收到超时错误或无法获取,我也尝试更改 dns。
例如 :
Err:8 http://in.archive.ubuntu.com/ubuntu bionic InRelease
Could not connect to in.archive.ubuntu.com:80 (103.97.84.254), connection timed out
有什么需要更改或重置吗?
我想升级我的 openssh 版本以解决CVE-2024-6387问题,运行后apt update
我apt upgrade
看到以下输出:
❯ sudo apt upgrade openssh-client
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
openssh-client is already the newest version (1:8.9p1-3ubuntu0.10).
openssh-client set to manually installed.
Calculating upgrade... Done
#
# OpenSSH CVE-2024-6387 has been fixed for 22.04 LTS, 23.10 and 24.04 LTS.
# RegreSSHion: Possible RCE Due To A Race Condition In Signal Handling.
# For more details see: https://ubuntu.com/security/notices/USN-6859-1.
#
The following packages have been kept back:
python3-update-manager update-manager update-manager-core
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
❯ sudo apt upgrade openssh-server
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
openssh-server is already the newest version (1:8.9p1-3ubuntu0.10).
Calculating upgrade... Done
#
# OpenSSH CVE-2024-6387 has been fixed for 22.04 LTS, 23.10 and 24.04 LTS.
# RegreSSHion: Possible RCE Due To A Race Condition In Signal Handling.
# For more details see: https://ubuntu.com/security/notices/USN-6859-1.
#
The following packages have been kept back:
python3-update-manager update-manager update-manager-core
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
❯ ssh -V
OpenSSH_8.9p1 Ubuntu-3ubuntu0.10, OpenSSL 3.0.2 15 Mar 2022
因此,我的 openssh-client 和 openssh-server 都使用修补版本 8.9p1-3,但运行时ssh -V
我看到的是 8.9p1,这似乎是未修补的版本。这是预期的行为吗?ssh -V
还是它以某种方式指向了错误的版本?如果是这样,我该如何修复?
我的目标是在 Ubuntu 22.04 LTS(Jammy Jellyfish)机器上下载用于离线 Debian 11(Bullseye)服务器的软件包。
为此,我首先禁用了 /etc/apt/sources.list 和 /etc/apt/sources.list/* 中所有相关的 ubuntu 源,并添加了 debian 源列表:
deb [trusted=yes] http://deb.debian.org/debian bullseye main contrib non-free
deb-src [trusted=yes] http://deb.debian.org/debian bullseye main contrib non-free
deb [trusted=yes] http://deb.debian.org/debian bullseye-updates main contrib non-free
deb-src [trusted=yes] http://deb.debian.org/debian bullseye-updates main contrib non-free
deb [trusted=yes] http://deb.debian.org/debian bullseye-backports main contrib non-free
deb-src [trusted=yes] http://deb.debian.org/debian bullseye-backports main contrib non-free
deb [trusted=yes] http://security.debian.org/debian-security/ bullseye-security main contrib non-free
deb-src [trusted=yes] http://security.debian.org/debian-security/ bullseye-security main contrib non-free
通过刷新软件包列表sudo apt update
,然后使用以下命令下载相关软件包:
sudo apt-get download <Package> -t bullseye -d
确实会下载一些软件包。例如,xz-utils 将从 debian 存储库下载。其输出为apt-cache policy xz-utils
:
Version table:
> *** 5.2.5-2.1~deb11u1 500
500 http://deb.debian.org/debian bullseye/main amd64 Packages
500 http://security.debian.org/debian-security bullseye-security/main amd64 Packages
100 /var/lib/dpkg/status
> 5.2.5-2ubuntu1 500
500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
但是,大多数情况下,apt 会尝试下载 ubuntu 版本,即使 debian 版本是唯一可用的存储库。例如,在下载 ufw 时,我得到以下输出sudo apt-cache policy ufw
:
Version table:
> *** 0.36.1-4ubuntu0.1 500
500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
500 http://archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages
100 /var/lib/dpkg/status
> 0.36-7.1 500
500 http://deb.debian.org/debian bullseye/main amd64 Packages
500 http://deb.debian.org/debian bullseye/main i386 Packages
当我尝试下载该软件包时,收到:
错误:找不到源来下载“ufw”版本“ 0.36.1-4ubuntu0.1 ”
一旦我启用 ubuntu 源,它就会下载适用于 ubuntu 的软件包,即使 debian repo 可用且具有相同的软件包。
我如何“强制” Ubuntu 下载 Debian 软件包,而不是查找仅在 Ubuntu 存储库中可用的版本?“-t bullseye”似乎不起作用。
我正在尝试使用 Bash 脚本自动执行下载过程,因此我迫切希望找到一种尽可能灵活的方法
我正在尝试安装 nvtop,它位于官方存储库https://packages.ubuntu.com/search?keywords=nvtop中。但 apt 无法找到该包。
$ sudo apt install nvtop
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package nvtop
我的sources.list
似乎还好
$ cat sources.list
deb http://archive.ubuntu.com/ubuntu noble main universe
deb http://security.ubuntu.com/ubuntu/ noble-security universe main
deb http://archive.ubuntu.com/ubuntu noble-updates universe main
我已经使用这个系统几个月了,从来没有遇到过任何其他包管理器问题。如何调试此问题并安装 nvtop?
当我尝试安装时(在最近从 Ubuntu 23.10 升级到 Ubuntu 24.04)
sudo apt install npm
我明白了
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
npm : Depends: node-abbrev but it is not going to be installed
Depends: node-agent-base but it is not going to be installed
Depends: node-aproba but it is not going to be installed
Depends: node-archy but it is not going to be installed
Depends: node-base64-js but it is not going to be installed
Depends: node-binary-extensions but it is not going to be installed
Depends: node-cacache (>= 17) but it is not going to be installed
Depends: node-chalk (>= 5.1.2-2~) but it is not going to be installed
Depends: node-chownr but it is not going to be installed
Depends: node-ci-info but it is not going to be installed
Depends: node-cli-table3
Depends: node-colors but it is not going to be installed
Depends: node-columnify but it is not going to be installed
Depends: node-cssesc
Depends: node-debug but it is not going to be installed
Depends: node-depd but it is not going to be installed
Depends: node-diff but it is not going to be installed
Depends: node-emoji-regex
Depends: node-encoding but it is not going to be installed
Depends: node-events but it is not going to be installed
Depends: node-glob but it is not going to be installed
Depends: node-got but it is not going to be installed
Depends: node-graceful-fs but it is not going to be installed
Depends: node-gyp but it is not going to be installed
Depends: node-hosted-git-info (>= 6) but it is not going to be installed
Depends: node-http-proxy-agent but it is not going to be installed
Depends: node-https-proxy-agent but it is not going to be installed
Depends: node-ieee754 but it is not going to be installed
Depends: node-ini but it is not going to be installed
Depends: node-ip but it is not going to be installed
Depends: node-ip-regex but it is not going to be installed
Depends: node-json-parse-better-errors but it is not going to be installed
Depends: node-jsonparse but it is not going to be installed
Depends: node-lru-cache but it is not going to be installed
Depends: node-minimatch but it is not going to be installed
Depends: node-minipass but it is not going to be installed
Depends: node-mkdirp but it is not going to be installed
Depends: node-ms but it is not going to be installed
Depends: node-negotiator but it is not going to be installed
Depends: node-nopt but it is not going to be installed
Depends: node-normalize-package-data but it is not going to be installed
Depends: node-npm-bundled but it is not going to be installed
Depends: node-npm-normalize-package-bin
Depends: node-npm-package-arg (>= 10) but it is not going to be installed
Depends: node-npmlog but it is not going to be installed
Depends: node-once but it is not going to be installed
Depends: node-p-map but it is not going to be installed
Depends: node-postcss-selector-parser
Depends: node-promise-retry but it is not going to be installed
Depends: node-promzard but it is not going to be installed
Depends: node-read but it is not going to be installed
Depends: node-read-package-json but it is not going to be installed
Depends: node-rimraf but it is not going to be installed
Depends: node-semver but it is not going to be installed
Depends: node-ssri but it is not going to be installed
Depends: node-string-width but it is not going to be installed
Depends: node-strip-ansi but it is not going to be installed
Depends: node-tar but it is not going to be installed
Depends: node-text-table but it is not going to be installed
Depends: node-validate-npm-package-license but it is not going to be installed
Depends: node-validate-npm-package-name but it is not going to be installed
Depends: node-which but it is not going to be installed
Depends: node-wrappy but it is not going to be installed
Depends: node-write-file-atomic but it is not going to be installed
Depends: node-yallist but it is not going to be installed
Depends: nodejs:any
Recommends: node-tap but it is not going to be installed
wine-devel-amd64 : Depends: libasound2-plugins but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
当我跑步时sudo apt --fix-broken install
我得到
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
mailcap
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
libasound2-plugins
The following NEW packages will be installed:
libasound2-plugins
0 upgraded, 1 newly installed, 0 to remove and 106 not upgraded.
177 not fully installed or removed.
Need to get 0 B/74.8 kB of archives.
After this operation, 402 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 533433 files and directories currently installed.)
Preparing to unpack .../libasound2-plugins_1.2.7.1-1ubuntu5_amd64.deb ...
Unpacking libasound2-plugins:amd64 (1.2.7.1-1ubuntu5) ...
dpkg: error processing archive /var/cache/apt/archives/libasound2-plugins_1.2.7.1-1ubuntu5_amd64.deb (--unpack):
trying to overwrite shared '/etc/alsa/conf.d/99-pulseaudio-default.conf.example', which is different from other instances of package libasound2-plugi
ns:amd64
Errors were encountered while processing:
/var/cache/apt/archives/libasound2-plugins_1.2.7.1-1ubuntu5_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
如果我尝试删除 wine(我有开发版本):sudo apt remove winehq-devel
或者sudo apt-get --purge remove wine
我遇到同样的问题:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
wine-devel-amd64 : Depends: libasound2-plugins but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
我对我的机器 lubuntu 22.04 进行了升级但失败了,现在我无法升级或安装任何东西。
user@host:~$ sudo apt remove cmatrix
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
cmatrix linux-image-6.5.0-18-generic
0 upgraded, 0 newly installed, 2 to remove and 2 not upgraded.
4 not fully installed or removed.
After this operation, 14.3 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 352555 files and directories currently installed.)
Removing linux-image-6.5.0-18-generic (6.5.0-18.18~22.04.1) ...
Failed to create symlink to vmlinuz-6.5.0-41-generic: Operation not permitted at /usr/bin/linux-update-symlinks line 64.
dpkg: error processing package linux-image-6.5.0-18-generic (--remove):
installed linux-image-6.5.0-18-generic package post-removal script subprocess returned error exit status 1
Removing cmatrix (2.0-3) ...
Errors were encountered while processing:
linux-image-6.5.0-18-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
此处的 Cmatrix 就是一个例子。
我尝试过sudo dpkg --configure -a
,它告诉我
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Setting up linux-image-6.5.0-41-generic (6.5.0-41.41~22.04.2) ...
Failed to create symlink to vmlinuz-6.5.0-41-generic: Operation not permitted at /usr/bin/linux-update-symlinks line 64.
dpkg: error processing package linux-image-6.5.0-41-generic (--configure):
installed linux-image-6.5.0-41-generic package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.10.2-1) ...
dpkg: dependency problems prevent configuration of linux-image-generic-hwe-22.04:
linux-image-generic-hwe-22.04 depends on linux-image-6.5.0-41-generic; however:
Package linux-image-6.5.0-41-generic is not configured yet.
dpkg: error processing package linux-image-generic-hwe-22.04 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-hwe-22.04:
linux-generic-hwe-22.04 depends on linux-image-generic-hwe-22.04 (= 6.5.0.41.41~22.04.2); however:
Package linux-image-generic-hwe-22.04 is not configured yet.
dpkg: error processing package linux-generic-hwe-22.04 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-image-6.5.0-41-generic
linux-image-generic-hwe-22.04
linux-generic-hwe-22.04
也尝试过sudo apt install -f
结果是:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
linux-image-6.5.0-18-generic
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
4 not fully installed or removed.
After this operation, 14.3 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 352545 files and directories currently installed.)
Removing linux-image-6.5.0-18-generic (6.5.0-18.18~22.04.1) ...
Failed to create symlink to vmlinuz-6.5.0-41-generic: Operation not permitted at /usr/bin/linux-update-symlinks line 64.
dpkg: error processing package linux-image-6.5.0-18-generic (--remove):
installed linux-image-6.5.0-18-generic package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-6.5.0-18-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
我希望有人能帮助我解决这个问题。 谢谢。
Apt 突然说这些包libdaxctl1 libndctl6 libpmem1
不再需要,应该自动删除。
这些包听起来都非常重要。所以我将它们设置为手动安装。
有人能帮我找出哪些软件包依赖于它们而不再需要它们或者它们被什么替换了?我在 kubuntu 24.04 上。
我目前正在试验 ksmbd。ubuntu 24.04 中 ksmbd 工具的当前版本打包失败,安装失败- 我最终下载了 deb-src 并根据此处建议的更改构建了一个包。我不是在问如何修复它。
我没有更改版本等。我编辑了软件包,使用 apt 明确安装修改后的软件包,它运行正常
geek@testbox:~$ apt info ksmbd-tools
Package: ksmbd-tools
Version: 3.5.1-1build2
Priority: optional
Section: universe/utils
Origin: Ubuntu
这就是我现在所拥有的。
ksmbd往往存在相当多的安全问题,虽然我在封闭的网络上运行它,但安全性还不错 - 我希望在问题解决后更新到官方支持的存储库版本,但现在就开始使用它。一旦包装修复,存储库中的更新版本是否会简单地替换我现有的版本?