我注意到包的元数据(例如git)中有版本限制。APT 使用什么算法来满足这些依赖关系?
例如,Spack使用Clingo作为其依赖项求解器,Conda 和 Mamba 使用libsolv,Pip使用自己的自定义回溯求解器。
我对 ubuntu 和 linux 不太熟悉,我正在尝试安装 FUSE,以便可以安装 .appimage 文件。但是当我尝试使用 apt 或 apt-get 安装或升级某些内容时,出现此错误:
emacs: error while loading shared libraries: libotf.so.1: cannot open shared object file: No such file or directory
尽管我对 Linux 很陌生,但我知道符号链接是什么,并且注意到 和libotf.so.1
链接libotf.so.0
到的libotf.so
符号链接都不存在。
我不知道如何解决这个问题,所以我将非常感谢任何帮助!
我第一天在 Ubuntu 上尝试使用 Python 编码时做了一些错误的事情,所以我重新安装了它。谁能告诉我在这里安装Python的最佳方法吗?我正在使用 Ubuntu 20.04,现在正在更新到 Ubuntu 23.10。
我懂了sudo apt install python3
?好吧,但这就是我的 Ubuntu 损坏的原因。谁能告诉我如何在不破坏任何程序的情况下安装完整的 python - 使用 python pip、venv 以及其他需要的东西。
有人问为什么我需要最新的python版本。我只是更喜欢它,但我想要任何Python 3(我更喜欢使用3.9和新的总是)。
我没有安装任何Python。我唯一做的就是sudo apt install python3-pip
python3-venv (和 python3.11-venv),venvs 无法安装,但为什么 VSCode 现在显示 4 个不同的 Python 解释器?我没有安装任何python版本。我从 ISO 文件安装了 Ubuntu 20.04,并升级到 23.10。Ubuntu 23.10 上的默认 Python 包是 python3.12。
显示 Python 解释器的 VSCode 图像:
ashish@ashish-pc:~$ pip3 --version
pip 23.1.2 from /usr/lib/python3/dist-packages/pip (python 3.11)
ashish@ashish-pc:~$ pip3 --version
pip 23.1.2 from /usr/lib/python3/dist-packages/pip (python 3.11)
ashish@ashish-pc:~$ sudo apt-get update && sudo apt-get install python3-venv
Hit:1 http://mirrors.piconets.webwerks.in/ubuntu-mirror/ubuntu mantic InRelease
Hit:2 http://mirrors.piconets.webwerks.in/ubuntu-mirror/ubuntu mantic-updates InRelease
Hit:3 http://mirrors.piconets.webwerks.in/ubuntu-mirror/ubuntu mantic-backports InRelease
Hit:4 http://mirrors.piconets.webwerks.in/ubuntu-mirror/ubuntu mantic-security InRelease
Hit:5 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:6 https://packages.microsoft.com/repos/code stable InRelease
Hit:7 http://archive.ubuntu.com/ubuntu mantic InRelease
Hit:8 http://archive.ubuntu.com/ubuntu mantic-updates InRelease
Hit:9 http://security.ubuntu.com/ubuntu mantic-security InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python3-venv : Depends: python3.11-venv (>= 3.11.2-1~) but it is not going to be installed
Depends: python3 (= 3.11.2-1) but 3.11.4-5 is to be installed
E: Unable to correct problems, you have held broken packages.
ashish@ashish-pc:~$ ^C
ashish@ashish-pc:~$
我用过sudo apt install python3-pip
它,效果很好,我得到了点。现在,当我尝试时,sudo apt install python3-venv
它生成了一条错误消息。我刚刚注意到该python -m venv
命令存在。
我似乎无法apt
更新 - 除了启用deb-src
软件包和docker
存储库之外mozilla
,我的 apt 配置应该相当标准(而且看起来它们无论如何都不是问题) - 任何人都知道我可以做什么来解决这个问题?
$ sudo apt-get update
Hit:1 http://gb.archive.ubuntu.com/ubuntu mantic InRelease
Hit:2 http://gb.archive.ubuntu.com/ubuntu mantic-updates InRelease
Hit:3 http://gb.archive.ubuntu.com/ubuntu mantic-backports InRelease
Hit:4 https://download.docker.com/linux/ubuntu mantic InRelease
Hit:5 http://security.ubuntu.com/ubuntu mantic-security InRelease
Get:6 https://packages.mozilla.org/apt mozilla InRelease [1,350 B]
Get:7 https://packages.mozilla.org/apt mozilla/main amd64 Packages [81.4 kB]
Err:8 https://packages.mozilla.org/apt mozilla/main all Packages
400 Bad Request [IP: 34.160.78.70 443]
Fetched 81.4 kB in 1s (65.0 kB/s)
Reading package lists... Done
E: Failed to fetch https://packages.mozilla.org/apt/dists/mozilla/main/binary-all/Packages 400 Bad Request [IP: 34.160.78.70 443]
E: Some index files failed to download. They have been ignored, or old ones used instead.
我需要建立一个新服务器。为了避免在几周内进行发行版升级,我正在考虑安装 24.04 的预发行版本。不过我有几个问题。我可以使用内置的包管理器(apt、snap)来更新它吗?这会使其与每日发布的内容保持一致吗?当下个月正式发布时,这只是预发布版本的更新吗?
我尝试使用 BalenaEtcher 创建可启动 USB,但在安装程序时遇到错误。
.deb
我从github 发布页面下载了主文件,但是当我运行时sudo apt install ./balena-etcher_1.19.5_amd64.deb
:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'balena-etcher' instead of './balena-etcher_1.19.5_amd64.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
balena-etcher : Depends: gconf-service but it is not installable
Depends: gconf2 but it is not installable
Depends: libgconf-2-4 but it is not installable
E: Unable to correct problems, you have held broken packages.
我想这可能与我使用23.10
. 有谁知道如何解决这一问题?
编辑(根据评论的建议)
sudo apt install gconf-service
:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package gconf-service is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'gconf-service' has no installation candidate
sudo apt install gconf2
:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package gconf2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'gconf2' has no installation candidate
sudo apt install libgconf-2-4
:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package libgconf-2-4 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libgconf-2-4' has no installation candidate
sudo apt update
:
Hit:1 http://us.archive.ubuntu.com/ubuntu mantic InRelease
Hit:2 https://brave-browser-apt-release.s3.brave.com stable InRelease
Hit:3 http://security.ubuntu.com/ubuntu mantic-security InRelease
Hit:4 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:5 http://us.archive.ubuntu.com/ubuntu mantic-updates InRelease
Hit:6 http://us.archive.ubuntu.com/ubuntu mantic-backports InRelease
Hit:7 https://hub-dist.unity3d.com/artifactory/hub-debian-prod-local stable InRelease
Hit:8 https://ppa.launchpadcontent.net/mjasnik/ppa/ubuntu mantic InRelease
Hit:9 https://ppa.launchpadcontent.net/mkusb/ppa/ubuntu mantic InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
apt policy gconf-service
:
gconf-service:
Installed: (none)
Candidate: (none)
Version table:
我正在尝试运行 apt-get update 并为 gitlab-runner 收到此错误:
# apt-get update
.
.
.
Get:6 https://packages.gitlab.com/runner/gitlab-runner/ubuntu focal InRelease [23.5 kB]
Err:6 https://packages.gitlab.com/runner/gitlab-runner/ubuntu focal InRelease
The following signatures were invalid: EXPKEYSIG 3F01618A51312F3F GitLab B.V. (package repository signing key) <[email protected]>
Reading package lists... Done
W: GPG error: https://packages.gitlab.com/runner/gitlab-runner/ubuntu focal InRelease: The following signatures were invalid: EXPKEYSIG 3F01618A51312F3F GitLab B.V. (package repository signing key) <[email protected]>
E: The repository 'https://packages.gitlab.com/runner/gitlab-runner/ubuntu focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
You have new mail in /var/mail/root
#
.
.
.
我已经完成了一些关于这个完全相同的错误的帖子,但没有任何建议可以解决我的问题。
https://docs.gitlab.com/omnibus/update/package_signatures.html#package-repository-metadata-signing-keys上的官方 GitLab 签名密钥指南无法解决该问题。
上面的页面建议:
awk '/deb \[signed-by=/{
pubkey = $2;
sub(/\[signed-by=/, "", pubkey);
sub(/\]$/, "", pubkey);
print pubkey
}' /etc/apt/sources.list.d/gitlab_gitlab-?e.list | \
while read line; do
curl -s "https://packages.gitlab.com/gpg.key" | gpg --dearmor > $line
done
或者
apt-key del 3F01618A51312F3F
curl -s "https://packages.gitlab.com/gpg.key" | apt-key add -
apt-key list 3F01618A51312F3F
解决 gitlab-runner 的包存储库签名密钥已过期的问题,但错误仍然完全相同:
W: GPG error: https://packages.gitlab.com/runner/gitlab-runner/ubuntu focal InRelease: The following signatures were invalid: EXPKEYSIG 3F01618A51312F3F GitLab B.V. (package repository signing key) <[email protected]>
我还尝试了此处和其他地方找到的许多帖子中的步骤来更新存储库签名密钥,但没有任何效果 - 错误仍然相同。
这似乎是一个简单的操作 - 更新 APT 存储库的存储库签名密钥 - 但我究竟该如何执行此操作才能使 gitlab-runner 再次在 Ubuntu 20.04.6 LTS 中可更新和可维护?
这把钥匙
https://packages.gitlab.com/gpg.key
无论我做什么,gitlab-runner APT 存储库的“apt-get update”命令都认为它无效。
有任何想法吗?
谢谢!
(PS - 意识到“apt-key”已被弃用,但我只需要再次更新/可更新 gitlab-runner,现在不介意“apt-key”已被弃用。更新 gitlab-runner 后,我可以花时间学习如何使用 gpg 本身而不是 apt-key 来应对将来的签名到期。)
我正在尝试将老式 Xubuntu 20.04LTS 升级到 22.04。这个东西出现了一些问题,让我一路上对问题非常警惕,所以刚才做了一次演练。
我没有做任何其他事情。这一切都发生在最后一个小时,所以我一路上并没有忘记任何一件小事。
是什么阻碍了这些,我该如何消除它?
我是 Linux 新手,当我尝试在ubuntu 22.04上安装postgresql时,在添加必要的 gpg 密钥的步骤之一中,不准确,似乎我从目录中删除了所有gpg文件,因为命令显示它正在被删除现在空了。但我记得有很多名字中都包含“ubuntu” 。好吧,我不知道如何备份必要的文件。我想可能有一些选项可以返回所有标准的 ubuntu gpg 密钥,但我自己找不到必要的信息。请你帮助我好吗?非常感谢!/etc/apt/keyrings
ls
我知道如何安装特定版本的软件包。现在我想升级系统的所有软件包:
sudo apt upgrade
但对于特定的包,我不希望它升级到最新版本,而是升级到特定的版本。例如,当前安装的版本是 1。最新可用的版本apt
是 3。我想升级到 2。可以使用 吗apt
?