标签: apt

如何在多台机器上高效管理apt?

我使用 puppet 管理大约 30 个 Ubuntu 服务器。我已经看到许多将 cron-apt 和 apticron 作为保持其软件包最新的方法的参考,但我一直无法找到一种集中管理该过程的方法。使用 cront-apt/apticron 我仍然需要登录到每个主机并运行aptitude update以执行更新。更不用说每当更新核心包时来自所有 30 台机器的审查通知。

一定有更好的方法。有什么建议?

ubuntu debian apt

11
推荐指数
3
解决办法
9375
查看次数

Vagrant/VirtualBox 无法从虚拟机中解析某些域

只是想出来的VirtualBox和流浪汉,我最初的lucid64VM解决不了us.archive.ubuntu.com,但可以解决security.ubuntu.comgoogle.comwww.apple.com(但不是apple.com瓦特/出www?!?!)。

运行虚拟机的主机和其他所有域都可以us.archive.ubuntu.com很好地解析。

不知道怎么回事?!?

vagrant@lucid64:~$ sudo apt-get install dkms -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  fakeroot make patch
Suggested packages:
  make-doc diffutils-doc
The following NEW packages will be installed:
  dkms fakeroot make patch
0 upgraded, 4 newly installed, 0 to remove and 23 not upgraded.
Need to …
Run Code Online (Sandbox Code Playgroud)

ubuntu resolv.conf virtualbox apt vagrant

11
推荐指数
2
解决办法
1万
查看次数

Ubuntu 上 pg_dump 的错误版本

我最初在 Ubuntu 上安装了 postgres 9.2,后来根据这里的说明升级到 9.3:http : //www.postgresql.org/download/linux/ubuntu/(使用 postgres apt 存储库)。

但是,作为 /usr/share/postgresql-common/pg_wrapper 的别名的 pg_dump 没有升级。

pg_dump: server version: 9.3.4; pg_dump version: 9.2.8
pg_dump: aborting because of server version mismatch
Run Code Online (Sandbox Code Playgroud)

我如何升级这个?我试图找出哪些软件包需要更新,但我什至不确定这是正确的做法。

ubuntu apt postgresql-9.3

11
推荐指数
4
解决办法
4万
查看次数

apt-get install linux-image-extra 得到“W: mdadm: /etc/mdadm/mdadm.conf 没有定义数组。”

安装时:

sudo apt-get install \
    linux-image-extra-$(uname -r) \
    linux-image-extra-virtual
Run Code Online (Sandbox Code Playgroud)

我正进入(状态:

W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
Run Code Online (Sandbox Code Playgroud)

我发现其他人也有类似的问题:apt-get update mdadm 可怕的警告

所以我按照说明操作:

/usr/share/mdadm/mkconf > /etc/mdadm/mdadm.conf
Run Code Online (Sandbox Code Playgroud)

然后:

update-initramfs -u
Run Code Online (Sandbox Code Playgroud)

但输出是:

update-initramfs: Generating /boot/initrd.img-4.10.0-30-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
Run Code Online (Sandbox Code Playgroud)

lsb_release -a

LSB Version:    core-9.20160110ubuntu5-amd64:core-9.20160110ubuntu5-noarch:security-9.20160110ubuntu5-amd64:security-9.20160110ubuntu5-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 17.04
Release:    17.04
Codename:   zesty
Run Code Online (Sandbox Code Playgroud)

vim /etc/mdadm/mdadm.conf

# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default (built-in), scan all partitions (/proc/partitions) and all
# …
Run Code Online (Sandbox Code Playgroud)

ubuntu mdadm apt ubuntu-17.04

11
推荐指数
1
解决办法
2万
查看次数

由于证书验证而导致 apt-get 更新失败

使用 Ubuntu Focal fossa。我试图为 VPN 安装检查点 ssl 软件,但似乎有些东西弄乱了我的所有证书。现在每当我尝试

sudo apt-get update
Run Code Online (Sandbox Code Playgroud)

我收到以下错误。

Get:1 file:/var/cudnn-local-repo-ubuntu2004-8.3.1.22  InRelease
Ign:1 file:/var/cudnn-local-repo-ubuntu2004-8.3.1.22  InRelease
Get:2 file:/var/cudnn-local-repo-ubuntu2004-8.3.1.22  Release [564 B]
Get:2 file:/var/cudnn-local-repo-ubuntu2004-8.3.1.22  Release [564 B]
Ign:3 https://dl.google.com/linux/chrome/deb stable InRelease
Ign:4 https://gitlab.com/feren-os/feren-repositories-neon-focal/raw/master stable InRelease        
Err:5 https://dl.google.com/linux/chrome/deb stable Release                                        
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 74.125.68.91 443]
Ign:6 https://dl.winehq.org/wine-builds/ubuntu focal InRelease                                     
Ign:7 https://gitlab.com/feren-os/feren-repositories-focal/raw/master stable InRelease             
Err:8 https://dl.winehq.org/wine-builds/ubuntu focal Release                                       
  Certificate verification failed: The …
Run Code Online (Sandbox Code Playgroud)

certificate update apt ubuntu-20.04

11
推荐指数
1
解决办法
7万
查看次数

为什么 apt-get update 告诉我运行 apt-get update?

所以我有这样的事情:

# apt-get update
Get:1 http://ftp.us.debian.org etch Release.gpg [1032B]                     
Hit http://ftp.us.debian.org etch Release                                        
(...bunch more of this elided...)
Hit http://ftp.us.debian.org etch/contrib Sources
Fetched 68.8kB in 1s (37.4kB/s)
Reading package lists... Done
W: There is no public key available for the following key IDs:
9AA38DCD55BE302B
W: GPG error: http://ftp.us.debian.org etch Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE302B
W: You may want to run apt-get update to correct these problems
Run Code Online (Sandbox Code Playgroud)

显然我不能跑步apt-get update …

linux debian gpg apt

10
推荐指数
3
解决办法
3万
查看次数

yum 和 debian 存储库的缓存代理

  1. 是否存在 yum 的缓存代理,类似于 Debian 存储库的缓存代理?

  2. 有没有办法让reprepro的行为与大约相同?我听说 approx 不太稳定;此外,我更喜欢使用 reprepro,这样我就可以使用我现有的 Web 服务器来为存储库提供服务。

proxy cache yum apt

10
推荐指数
1
解决办法
4281
查看次数

为基于 HTTPS 的内部 APT 存储库使用自签名 SSL 证书

我已经建立了一个 Debian 存储库(实际上是 Ubuntu),供内部使用一些私有软件包,现在希望通过网络将其提供给某些特定服务器。我希望 apt-get / aptitude 使用 HTTPS 连接到它,因为我不想花任何钱使用自签名证书。

我已经尝试按照 apt.conf 手册页指向 apt-get 使用我自己的根 CA 证书来验证主机,但它似乎不起作用。

我的 apt.conf 文件如下所示:

#Acquire::https::repo.mydomain.com::Verify-Peer "false";
Acquire::https::repo.mydomain.com::CaInfo      "/etc/apt/certs/my-cacert.pem";
Acquire::https::repo.mydomain.com::SslCert     "/etc/apt/certs/my-cert.pem";
Acquire::https::repo.mydomain.com::SslKey      "/etc/apt/certs/my-key.pem";
Run Code Online (Sandbox Code Playgroud)

我也使用客户端证书,但这似乎不是问题,因为当我将 Verify-Peer 设置为“false”(如上所述)时,一切正常。

使用相同的 CA 证书,客户端证书和密钥可以很好地与 curl 配合使用。

我启用了 apt 调试(Debug::Acquire::https "true")但它提供的信息很少。

有关如何进行的任何建议?

ubuntu debian repository ssl-certificate apt

10
推荐指数
4
解决办法
3万
查看次数

在安装了 yum 的默认 Amazon EC2 实例上启用 apt-get

我想这样称呼:

sudo yum install apt
Run Code Online (Sandbox Code Playgroud)

使我能够使用 apt-get 和 yum 进行安装。

然而这行不通。我得到以下回复:

Loaded plugins: fastestmirror, priorities, security, update-motd
Loading mirror speeds from cached hostfile
 * amzn-main: packages.eu-west-1.amazonaws.com
 * amzn-updates: packages.eu-west-1.amazonaws.com
Setting up Install Process
No package apt available.
Error: Nothing to do
Run Code Online (Sandbox Code Playgroud)

看起来它需要让默认的 Amazon EC2 实例知道存储库。

简而言之:我如何才能简单地启用使用 apt-get 而不仅仅是 yum?

linux unix yum repository apt

10
推荐指数
1
解决办法
4万
查看次数

apt-get 特定存储库的代理?

请耐心等待,我已经尽我所能搜索了,但没有明显的解决方案。

我在我公司的防火墙后面,我们有几个代理服务器,我们可以用来进入大型互联网。我公司的 IT 小组已友好地镜像了 WAN 内的主要 Debian 存储库。

我想在 WAN(即 Internet)之外使用几个 repos。是否可以告诉 apt-get 为这些使用代理,而不是为其他使用代理?

启用并在 apt.conf 中定义代理后,它对防火墙内的内容进行限制,而没有定义代理,则对防火墙外的源进行限制。

apt.conf 的手册页中有一些提到,但是在 source.list 文件中放置代理语句不起作用(除非我的语法错误)。

谢谢

杰瑞

debian apt

10
推荐指数
1
解决办法
7099
查看次数