![apt-move 说软件包已被移动,但它们已经消失了](https://linux22.com/image/828266/apt-move%20%E8%AF%B4%E8%BD%AF%E4%BB%B6%E5%8C%85%E5%B7%B2%E8%A2%AB%E7%A7%BB%E5%8A%A8%EF%BC%8C%E4%BD%86%E5%AE%83%E4%BB%AC%E5%B7%B2%E7%BB%8F%E6%B6%88%E5%A4%B1%E4%BA%86.png)
我正在尝试使用 从不同存储库中选择软件包来设置 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
但实际上,里面没有太多信息。目录dists
和pool
也是空的。
手动操作无济于事。使用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 似乎可以解决问题。