访问本地存储库

访问本地存储库

我正在尝试访问本地存储库,该存储库恰好是 Ubuntu 14.04 可信版本的镜像。所有内容都已下载并且看起来不错,但我无法让 apt-get 从中安装任何软件包。我的/etc/apt/sources.list文件包含:

deb [arch=amd64] file:///unixdepot/ubuntu/repos/14.04/mirror/archive.ubuntu.com/ubuntu trusty universe
deb [arch=amd64] file:///unixdepot/ubuntu/repos/14.04/mirror/archive.ubuntu.com/ubuntu trusty main restricted
deb [arch=amd64] file:///unixdepot/ubuntu/repos/14.04/mirror/archive.ubuntu.com/ubuntu trusty-updates main restricted

这些文件存在于其中。当我尝试使用 apt-get 时,我得到:

root@tm1cldctll02-adm:/etc/apt# apt-get install libsm-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libsm-dev
root@tm1cldctll02-adm:/etc/apt#

但该文件存在:

root@tm1cldctll02-adm:/etc/apt# find /unix*/ub*/repo*/ -name "libsm-dev*"
/unixdepot/ubuntu/repos/14.04/mirror/archive.ubuntu.com/ubuntu/pool/main/libs/libsm/libsm-dev_1.2.1-2_amd64.deb

答案1

当您更改apt的源时,您必须使用apt-get update来使其知道这些更改。不这样做可能会产生奇怪的效果,最直接的效果是apt无法找到新源中应该存在的任何内容。

相关内容