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
    • 最新
    • 标签
主页 / user-169573

Rolf's questions

Martin Hope
Rolf
Asked: 2019-03-09 02:03:56 +0800 CST

为什么 apt-get 忽略目标参数?

  • 1

我的 Debian 系统设置为默认安装不稳定的软件包

$ cat /etc/apt/apt.conf.d/99defaultrelease 
APT::Default-Release "unstable";

但是,我想automake从stable1.15 版中提取

$ apt-cache policy automake
automake:
  Installed: (none)
  Candidate: 1:1.16.1-4
  Version table:
     1:1.16.1-4 990
        500 http://deb.debian.org/debian testing/main amd64 Packages
        500 http://deb.debian.org/debian testing/main i386 Packages
        990 http://deb.debian.org/debian unstable/main amd64 Packages
        990 http://deb.debian.org/debian unstable/main i386 Packages
        990 http://deb.debian.org/debian sid/main amd64 Packages
        990 http://deb.debian.org/debian sid/main i386 Packages
     1:1.15-6 500
        500 http://deb.debian.org/debian stable/main amd64 Packages
        500 http://deb.debian.org/debian stable/main i386 Packages

但是每当我告诉它 installautomake/stable或automakewith 时-t stable,都会apt忽略该部分。

$ apt-get install automake -t stable --dry-run
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  autoconf autotools-dev
Suggested packages:
  autoconf-archive gnu-standards autoconf-doc libtool
The following NEW packages will be installed:
  autoconf automake autotools-dev
0 upgraded, 3 newly installed, 0 to remove and 125 not upgraded.
Inst autoconf (2.69-11 Debian:testing, Debian:unstable [all])
Inst autotools-dev (20180224.1 Debian:testing, Debian:unstable [all])
Inst automake (1:1.16.1-4 Debian:testing, Debian:unstable [all])
Conf autoconf (2.69-11 Debian:testing, Debian:unstable [all])
Conf autotools-dev (20180224.1 Debian:testing, Debian:unstable [all])
Conf automake (1:1.16.1-4 Debian:testing, Debian:unstable [all])

我可以像这样指定包版本:

apt-get install automake=1:1.15-6

这应该可以解决我的问题,尽管依赖项(autoconf、autotools-dev 等)仍然会从不稳定的环境中安装,这有点令人担忧。

无论如何,为什么在这种情况下忽略给定的目标?

另外 - 这不是一个问题 - 如果这种行为是“设计使然”,我认为如果apt可以打印一些信息通知会非常好。

编辑

这是apt -t stable policy automake(注意:安装后automake)的输出

$ apt -t stable policy automake
automake:
  Installed: 1:1.16.1-4
  Candidate: 1:1.16.1-4
  Version table:
 *** 1:1.16.1-4 1001
        500 http://deb.debian.org/debian testing/main amd64 Packages
        500 http://deb.debian.org/debian testing/main i386 Packages
       1001 http://deb.debian.org/debian unstable/main amd64 Packages
       1001 http://deb.debian.org/debian unstable/main i386 Packages
       1001 http://deb.debian.org/debian sid/main amd64 Packages
       1001 http://deb.debian.org/debian sid/main i386 Packages
        100 /var/lib/dpkg/status
     1:1.15-6 990
        990 http://deb.debian.org/debian stable/main amd64 Packages
        990 http://deb.debian.org/debian stable/main i386 Packages

由于这可能是优先级的问题,因此这也可能是相关的:

$ cat /etc/apt/preferences
Package: *
Pin: release a=unstable
Pin-Priority: 1001
debian apt
  • 1 个回答
  • 336 Views
Martin Hope
Rolf
Asked: 2018-02-06 10:43:37 +0800 CST

Systemd:查找服务的依赖项

  • 16
systemctl list-dependencies postgres

将列出postgres服务的所有依赖项。如何找到服务(或单元或目标)的 所有依赖项?

systemd dependencies
  • 1 个回答
  • 23213 Views
Martin Hope
Rolf
Asked: 2018-01-16 01:10:28 +0800 CST

使用 apt-get 删除软件包和安装的依赖项

  • 7

所以我安装了一个包

apt-get install mypackage

apt-get 安装带有依赖项的软件包,并报告在我的磁盘上安装了 10 兆字节。

但我改变主意,所以我走了

apt-get remove mypackage

apt-get 宣布将释放 166 KB。

我不想用剩菜乱扔我的磁盘,所以我尝试

apt-get autoremove mypackage

现在 apt-get 想要从我的磁盘中删除 166 兆字节。

你知道,我如何撤消最后的安装操作,或者只是卸载单个包及其所有依赖项?

或者,是否有另一个我可以使用的包管理工具(即使在不同的发行版上),它会将安装操作大致视为可以完成和撤消的原子操作?

apt package-management
  • 3 个回答
  • 27748 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve