使用 APT,您可以使用以下命令安装特定版本的软件包:
apt-get install package=1.0
Run Code Online (Sandbox Code Playgroud)
但你做不到
apt-get install package=1.*
Run Code Online (Sandbox Code Playgroud)
那么,我如何才能找出package特定存储库或我的所有存储库中的哪些版本可用/etc/apt/sources.list?
cat /etc/apt/sources.list
deb http://deb.debian.org/debian jessie main
deb http://deb.debian.org/debian jessie-updates main
deb http://security.debian.org jessie/updates main
Run Code Online (Sandbox Code Playgroud)
然后 apt-get 更新失败。
如果我删除第二行,那么上面的命令工作正常。
我检查了存储库。没有名称为 jessie-updates 的文件夹。
我们有许多需要 apt-get 更新的 docker 版本。
我无法更新所有 docker 文件以删除第二行。
继续进行的最佳方法是什么,以及它们是否被永久删除或临时故障
运行后apt-get upgrade,我会得到将要升级的软件包的列表。我想知道其中一个软件包的版本号。(不是当前的,而是将要安装的)。
如何获取要安装的软件包的版本号?
我正在尝试为我的上网本创建一个极简的 debian 安装。我有一个在全新的最小 debian 安装后创建的 clonezilla 还原点。
除了 debian 在最小安装期间自动安装的软件包之外,我没有任何软件包。我取消了 taskel 中的所有内容(没有桌面环境,什么都没有)。
我想安装一些软件包。由于我正在创建一个极简安装,我想始终使用sudo apt-get --no-install-recommends <package-name>.
有没有办法可以像自定义缩写命令一样为此创建?或者有没有一种方法可以将一堆命令复制并粘贴到文本文档中,然后使用一个命令按顺序运行它们?您是否知道一种更简单、更优雅的方法来完成从新安装的最小命令提示符运行一堆软件包的安装?
有时它会这样做:
After this operation, 713kB of additional disk space will be used.
Do you want to continue [Y/n]?
Run Code Online (Sandbox Code Playgroud)
有时不是,只是假设“是”并自动下载(我无法粘贴实际输出,因为我不知道如何重现它)。
为什么?
我一直在卸载应用程序以及使用命令删除或清除它们的配置文件apt-get --purge remove {package_name}。
我在网上看到了几篇文章,包括https://help.ubuntu.com/community/AptGet/Howto上的 Ubuntu 指南,该指南在"This command completely removes a package and the associated configuration files. Configuration files residing in ~ are not usually affected by this command"仅使用命令时读取apt-get purge {package_name}。
运行命令apt-get --purge remove {package_name}和apt-get purge {package_name}?有区别吗?你为什么要使用一个?
尝试这样做sudo apt-get update,每次运行时都会得到此响应:
Get:1 http://repo.radeon.com/rocm/apt/debian xenial InRelease [1814 B]
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Err:1 http://repo.radeon.com/rocm/apt/debian xenial InRelease
Couldn't create temporary file /tmp/apt.conf.RpjjUo for passing config to apt-key
Err:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
Couldn't create temporary file /tmp/apt.conf.IvhgJr for passing config to apt-key
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Err:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Couldn't create temporary file /tmp/apt.conf.F98B6M for passing config to apt-key
Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Err:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Couldn't create temporary file /tmp/apt.conf.WWtE1d …Run Code Online (Sandbox Code Playgroud) 我有一个场景,我想删除一组可能已安装或可能未安装的软件包,我希望 apt-get 删除那些并默默忽略那些没有安装的软件包。就像是:
apt-get remove foo bar baz
Run Code Online (Sandbox Code Playgroud)
如果 foo 和 bar 已安装但 baz 未安装,则会删除 foo 和 bar 而不会抱怨 baz。有没有办法做到这一点?
我尝试过但没有奏效的事情,将 cups-dbg 作为要删除的替罪羊实际安装的软件包:
jcp@a-boyd:~$ sudo apt-get remove -y cups-dbg bogus-package
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package bogus-package
jcp@a-boyd:~$ sudo apt-get remove --ignore-missing cups-dbg bogus-package
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package bogus-package
jcp@a-boyd:~$ sudo apt-get remove --fix-broken cups-dbg bogus-package
Reading package …Run Code Online (Sandbox Code Playgroud) 我们知道它apt-get在基于 debian 的系统上使用,那么在 Red Hat Enterprise Linux (RHEL) 系统上使用的是什么?是否可以apt-get在 Red Hat 上安装和使用?
当我跑步时,apt-get update我得到
Ign:1 http://dl.google.com/linux/musicmanager/deb stable InRelease
Ign:2 http://archive-4.kali.org/kali kali-rolling InRelease
Hit:3 http://archive-4.kali.org/kali-security sana/updates InRelease
0% [3 InRelease gpgv 11.9 kB] [Waiting for headers] [Waiting for headers]Couldn't create tempfiles for splitting up /var/lib/apt/lists/security.kali.org_kali-seErr:3 http://archive-4.kali.org/kali-security sana/updates InRelease
Could not execute 'apt-key' to verify signature (is gnupg installed?)
Hit:4 http://archive-4.kali.org/kali sana InRelease
0% [4 InRelease gpgv 20.3 kB] [Waiting for headers]Couldn't create tempfiles forErr:4 http://archive-4.kali.org/kali sana InRelease_dists_sana_InRelease
Could not execute 'apt-key' to verify signature (is gnupg installed?)
Get:5 http://archive-4.kali.org/kali kali-rolling Release …Run Code Online (Sandbox Code Playgroud)