即使软件包已经同步,apt-offline apt-get升级仍然尝试连接到在线服务器进行升级

即使软件包已经同步,apt-offline apt-get升级仍然尝试连接到在线服务器进行升级

我有一台服务器由于某些政策而无法上网。所以我必须使用 apt-offline 更新它。到目前为止,它在其他服务器上对我来说效果很好,但在这台服务器上却并非如此。

  • 我创建了 sig 文件,并将其移至在线服务器
  • 我使用 sig 文件在在线服务器上创建了捆绑包
  • 我将捆绑包移回离线服务器
  • 我安装了该捆绑包,输出显示所有重现均已同步
  • 我打电话apt-get upgrade,它显示了所有刚刚同步的包
  • 服务器尝试连接到互联网服务器0% [Connecting to cdn.debian.net] [Connecting to security.debian.org],请参见下文,即使输出显示它刚刚从捆绑包中同步了包...我不明白,我做错了什么?

看这里的apt-offline install命令和apt-get upgrade命令

root@CFRLJY1:~# apt-offline install /media/usb/bundle-24-11-2015-3.zip
gpgv: Signature made Tue Nov 24 04:54:22 2015 HKT using RSA key ID 46925553
gpgv: Good signature from "Debian Archive Automatic Signing Key (7.0/wheezy) <[email protected]>"
gpgv: Signature made Tue Nov 24 04:54:22 2015 HKT using RSA key ID 2B90D010
gpgv: Good signature from "Debian Archive Automatic Signing Key (8/jessie) <[email protected]>"
gpgv: Signature made Sat Sep  5 19:47:40 2015 HKT using RSA key ID 46925553
gpgv: Good signature from "Debian Archive Automatic Signing Key (7.0/wheezy) <[email protected]>"
gpgv: Signature made Sat Sep  5 19:47:40 2015 HKT using RSA key ID 2B90D010
gpgv: Good signature from "Debian Archive Automatic Signing Key (8/jessie) <[email protected]>"
gpgv: Signature made Sat Sep  5 19:47:55 2015 HKT using RSA key ID 65FFB764
gpgv: Good signature from "Wheezy Stable Release Key <[email protected]>"
gpgv: Signature made Mon Nov 23 08:50:55 2015 HKT using RSA key ID C857C906
gpgv: Good signature from "Debian Security Archive Automatic Signing Key (8/jessie) <[email protected]>"
gpgv: Signature made Mon Nov 23 08:50:55 2015 HKT using RSA key ID 46925553
gpgv: Good signature from "Debian Archive Automatic Signing Key (7.0/wheezy) <[email protected]>"
/var/lib/apt/lists/partial/ftp.cn.debian.org_debian_dists_wheezy-updates_Release synced.
/var/lib/apt/lists/partial/ftp.cn.debian.org_debian_dists_wheezy-updates_Release.gpg synced.
/var/lib/apt/lists/partial/ftp.cn.debian.org_debian_dists_wheezy-updates_main_binary-amd64_Packages synced.
/var/lib/apt/lists/partial/ftp.cn.debian.org_debian_dists_wheezy-updates_main_i18n_Translation-en synced.
/var/lib/apt/lists/partial/ftp.cn.debian.org_debian_dists_wheezy-updates_main_source_Sources synced.
/var/lib/apt/lists/partial/ftp.cn.debian.org_debian_dists_wheezy-updates_Release synced.
/var/lib/apt/lists/partial/ftp.cn.debian.org_debian_dists_wheezy-updates_Release.gpg synced.
/var/lib/apt/lists/partial/ftp.cn.debian.org_debian_dists_wheezy-updates_main_binary-amd64_Packages synced.
/var/lib/apt/lists/partial/ftp.cn.debian.org_debian_dists_wheezy-updates_main_i18n_Translation-en synced.
/var/lib/apt/lists/partial/ftp.cn.debian.org_debian_dists_wheezy-updates_main_source_Sources synced.
/var/lib/apt/lists/partial/ftp.cn.debian.org_debian_dists_wheezy_Release synced.
/var/lib/apt/lists/partial/ftp.cn.debian.org_debian_dists_wheezy_Release.gpg synced.
/var/lib/apt/lists/partial/ftp.cn.debian.org_debian_dists_wheezy_contrib_binary-amd64_Packages synced.
/var/lib/apt/lists/partial/ftp.cn.debian.org_debian_dists_wheezy_contrib_i18n_Translation-en synced.
/var/lib/apt/lists/partial/ftp.cn.debian.org_debian_dists_wheezy_main_binary-amd64_Packages synced.
/var/lib/apt/lists/partial/ftp.cn.debian.org_debian_dists_wheezy_main_i18n_Translation-en synced.
/var/lib/apt/lists/partial/ftp.cn.debian.org_debian_dists_wheezy_main_source_Sources synced.
/var/lib/apt/lists/partial/ftp.cn.debian.org_debian_dists_wheezy_non-free_binary-amd64_Packages synced.
/var/lib/apt/lists/partial/ftp.cn.debian.org_debian_dists_wheezy_non-free_i18n_Translation-en synced.
/var/lib/apt/lists/partial/security.debian.org_dists_wheezy_updates_Release synced.
/var/lib/apt/lists/partial/security.debian.org_dists_wheezy_updates_Release.gpg synced.
/var/lib/apt/lists/partial/security.debian.org_dists_wheezy_updates_contrib_binary-amd64_Packages synced.
/var/lib/apt/lists/partial/security.debian.org_dists_wheezy_updates_contrib_i18n_Translation-en synced.
/var/lib/apt/lists/partial/security.debian.org_dists_wheezy_updates_main_binary-amd64_Packages synced.
/var/lib/apt/lists/partial/security.debian.org_dists_wheezy_updates_main_i18n_Translation-en synced.
/var/lib/apt/lists/partial/security.debian.org_dists_wheezy_updates_main_source_Sources synced.
/var/lib/apt/lists/partial/security.debian.org_dists_wheezy_updates_non-free_binary-amd64_Packages synced.
/var/lib/apt/lists/partial/security.debian.org_dists_wheezy_updates_non-free_i18n_Translation-en synced.
root@CFRLJY1:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  krb5-locales libapache2-mod-php5 libfreetype6 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgssapi-krb5-2 libk5crypto3 libkrb5-3
  libkrb5support0 libmysqlclient18 libpng12-0 linux-image-3.2.0-4-amd64 mysql-client-5.5 mysql-common mysql-server mysql-server-5.5
  mysql-server-core-5.5 ntp php-pear php5 php5-cli php5-common php5-curl php5-mysql tzdata
25 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 42.0 MB of archives.
After this operation, 217 kB disk space will be freed.
Do you want to continue [Y/n]? Y
0% [Connecting to cdn.debian.net] [Connecting to security.debian.org]

非常感谢您提前提供任何提示和帮助!

答案1

输出apt-offline显示它安装了包索引文件,但没有安装实际的包。我不知道apt-offline,但是您不需要告诉它为您想要以某种方式安装或升级的软件包创建一个捆绑包吗?

答案2

最后我发现了问题所在并让它更新了实际的软件包。为了做到这一点,我必须重复整个过程两次。

  • 在离线计算机上创建签名文件
  • 在在线计算机上下载此签名文件的包
  • 在离线计算机上安装包 - 这次只更新了 apt 数据库,没有更新任何包
  • 在离线计算机上创建新的签名文件
  • 在在线计算机上下载此签名文件的包 - 这次下载了很多包
  • 在在线计算机上导入包 - 这次 apt 终于可以安装包了,因为包也同步了。

关键是所有事情都要做两次,首先更新 apt 数据库,然后更新软件包。

使用 github 存储库中的 apt-offline-debian-1.6.1:https://github.com/rickysarraf/apt-offline/releases

相关内容