apt-move 说软件包已被移动,但它们已经消失了

apt-move 说软件包已被移动,但它们已经消失了

我正在尝试使用 从不同存储库中选择软件包来设置 Ubuntu 镜像,apt-move我已经在 Ubuntu 10.04 上使用它,没有(太多)问题。

我已经apt-move根据我的需要安装并设置了它:

# dpkg -l | grep apt-move
ii  apt-move                    4.2.27-2                   Maintain Debian packages in a package pool

配置文件/etc/apt-move.conf如下:

# cat /etc/apt-move.conf | grep -v -e ^# -e ^$
APTSITES="/all/"
LOCALDIR=/var/local/mirrors/ubuntu
DIST=precise
PKGTYPE=binary
FILECACHE=/var/cache/apt/archives
LISTSTATE=/var/lib/apt/lists
DELETE=no
MAXDELETE=20
COPYONLY=no
PKGCOMP="none gzip"
CONTENTS=yes
GPGKEY=

当然,我已经创建了中提到的目录LOCALDIR

让我们尝试一下。完成之后,sudo apt-get -d install vim我有一些 deb 放在/var/cache/apt/archives

# ls -1 /var/cache/apt/archives/
libgpm2_1.20.4-4_amd64.deb
libpython2.7_2.7.3-0ubuntu3.1_amd64.deb
lock
partial
python2.7_2.7.3-0ubuntu3.1_amd64.deb
python2.7-minimal_2.7.3-0ubuntu3.1_amd64.deb
vim_2%3a7.3.429-2ubuntu2.1_amd64.deb
vim-common_2%3a7.3.429-2ubuntu2.1_amd64.deb
vim-runtime_2%3a7.3.429-2ubuntu2.1_all.deb
vim-tiny_2%3a7.3.429-2ubuntu2.1_amd64.deb

我先做一个apt-move get

# apt-move get

Updating from local Packages files...

All done, exiting.

然后是apt-move move

# apt-move move

Moving files...
Skipping files:
Moving Files:
/var/cache/apt/archives/libgpm2_1.20.4-4_amd64.deb
/var/cache/apt/archives/libpython2.7_2.7.3-0ubuntu3.1_amd64.deb
/var/cache/apt/archives/python2.7-minimal_2.7.3-0ubuntu3.1_amd64.deb
/var/cache/apt/archives/python2.7_2.7.3-0ubuntu3.1_amd64.deb
/var/cache/apt/archives/vim-common_2%3a7.3.429-2ubuntu2.1_amd64.deb
/var/cache/apt/archives/vim-runtime_2%3a7.3.429-2ubuntu2.1_all.deb
/var/cache/apt/archives/vim-tiny_2%3a7.3.429-2ubuntu2.1_amd64.deb
/var/cache/apt/archives/vim_2%3a7.3.429-2ubuntu2.1_amd64.deb

All done, exiting.

到目前为止一切顺利。让我们检查一下存储库池。

# ls -lah /var/local/mirrors/ubuntu/pool/
total 8,0K
drwxr-sr-x 2 root staff 4,0K dic  3 11:39 .
drwxr-sr-x 5 root staff 4,0K dic  3 11:39 ..

哎呀。它是空的。那么,包裹在哪里呢?

# find / -iname vim-common_2%3a7.3.429-2ubuntu2.1_amd64.deb
#

无处可去。很好。dists目录也是空的:

# ls -lah /var/local/mirrors/ubuntu/dists
total 8,0K
drwxr-sr-x 2 root staff 4,0K dic  3 11:50 .
drwxr-sr-x 5 root staff 4,0K dic  3 11:50 ..

但是,有一个.apt-move目录包含一些信息:

# ls /var/local/mirrors/ubuntu/.apt-move/
arch  binary  dists  pool  precise.arch.amd64  precise.binary  source  version

但实际上,里面没有太多信息。目录distspool也是空的。

手动操作无济于事。使用apt-move movefile结果相同:

# apt-move movefile vim_2%3a7.3.429-2ubuntu2.1_amd64.deb 

Moving files...

Skipping files:
Moving Files:
/var/cache/apt/archives/vim_2%3a7.3.429-2ubuntu2.1_amd64.deb

All done, exiting.

还有空目录。你知道会发生什么吗?

难道我做错了什么?

是否有一些 apt-move 的替代品(适合我的需求!)值得尝试?

答案1

这是一个Ubuntu 上的已知错误。幸运的是,已在 Debian 上修复并且仅通过使用 wget/dpkg 下载并安装软件包来从 Debian Sid 安装版本 4.2.27-3 似乎可以解决问题。

相关内容