帮酷LOGO
0 0 评论
  • 显示原文与译文双语对照的内容
文章标签:LOC  Repository  APT  REPO  GET  Apt-get  Local  Ubuntu  

问题:

我在 /CDs/ubuntu 目录中拥有xenial的本地存储库。 我的sources.list file:


deb file:/CDs/ubuntu xenial main restricted universe multiverse



更新结果:


#apt-get update


Get:1 file:/CDs/ubuntu xenial InRelease


Ign:1 file:/CDs/ubuntu xenial InRelease


Get:2 file:/CDs/ubuntu xenial Release [246 kB]


Get:2 file:/CDs/ubuntu xenial Release [246 kB]


Get:3 file:/CDs/ubuntu xenial Release.gpg [933 B]


Get:3 file:/CDs/ubuntu xenial Release.gpg [933 B]


Get:4 file:/CDs/ubuntu xenial/main amd64 Packages


Ign:4 file:/CDs/ubuntu xenial/main amd64 Packages


Get:5 file:/CDs/ubuntu xenial/main i386 Packages


Ign:5 file:/CDs/ubuntu xenial/main i386 Packages


Get:6 file:/CDs/ubuntu xenial/main Translation-en


Ign:6 file:/CDs/ubuntu xenial/main Translation-en


Get:7 file:/CDs/ubuntu xenial/main amd64 DEP-11 Metadata


Ign:7 file:/CDs/ubuntu xenial/main amd64 DEP-11 Metadata


Get:8 file:/CDs/ubuntu xenial/main DEP-11 64x64 Icons


Ign:8 file:/CDs/ubuntu xenial/main DEP-11 64x64 Icons


Get:9 file:/CDs/ubuntu xenial/restricted amd64 Packages


Ign:9 file:/CDs/ubuntu xenial/restricted amd64 Packages


Get:10 file:/CDs/ubuntu xenial/restricted i386 Packages


Ign:10 file:/CDs/ubuntu xenial/restricted i386 Packages


Get:11 file:/CDs/ubuntu xenial/restricted Translation-en


Ign:11 file:/CDs/ubuntu xenial/restricted Translation-en


Get:12 file:/CDs/ubuntu xenial/restricted amd64 DEP-11 Metadata


Ign:12 file:/CDs/ubuntu xenial/restricted amd64 DEP-11 Metadata


Get:13 file:/CDs/ubuntu xenial/universe amd64 Packages


Ign:13 file:/CDs/ubuntu xenial/universe amd64 Packages


Get:14 file:/CDs/ubuntu xenial/universe i386 Packages


Ign:14 file:/CDs/ubuntu xenial/universe i386 Packages


Get:15 file:/CDs/ubuntu xenial/universe Translation-en


Ign:15 file:/CDs/ubuntu xenial/universe Translation-en


Get:16 file:/CDs/ubuntu xenial/universe amd64 DEP-11 Metadata


Ign:16 file:/CDs/ubuntu xenial/universe amd64 DEP-11 Metadata


Get:17 file:/CDs/ubuntu xenial/universe DEP-11 64x64 Icons


Ign:17 file:/CDs/ubuntu xenial/universe DEP-11 64x64 Icons


Get:18 file:/CDs/ubuntu xenial/multiverse amd64 Packages


Ign:18 file:/CDs/ubuntu xenial/multiverse amd64 Packages


Get:19 file:/CDs/ubuntu xenial/multiverse i386 Packages


Ign:19 file:/CDs/ubuntu xenial/multiverse i386 Packages


Get:20 file:/CDs/ubuntu xenial/multiverse Translation-en


Ign:20 file:/CDs/ubuntu xenial/multiverse Translation-en


Get:21 file:/CDs/ubuntu xenial/multiverse amd64 DEP-11 Metadata


Ign:21 file:/CDs/ubuntu xenial/multiverse amd64 DEP-11 Metadata


Get:22 file:/CDs/ubuntu xenial/multiverse DEP-11 64x64 Icons


Ign:22 file:/CDs/ubuntu xenial/multiverse DEP-11 64x64 Icons


Get:4 file:/CDs/ubuntu xenial/main amd64 Packages [1,201 kB]


Ign:4 file:/CDs/ubuntu xenial/main amd64 Packages


Get:5 file:/CDs/ubuntu xenial/main i386 Packages [1,196 kB]


Ign:5 file:/CDs/ubuntu xenial/main i386 Packages


Get:6 file:/CDs/ubuntu xenial/main Translation-en [568 kB]


Ign:6 file:/CDs/ubuntu xenial/main Translation-en


Get:7 file:/CDs/ubuntu xenial/main amd64 DEP-11 Metadata [733 kB]


Ign:7 file:/CDs/ubuntu xenial/main amd64 DEP-11 Metadata


Get:8 file:/CDs/ubuntu xenial/main DEP-11 64x64 Icons [409 kB]


Ign:8 file:/CDs/ubuntu xenial/main DEP-11 64x64 Icons


Get:9 file:/CDs/ubuntu xenial/restricted amd64 Packages [8,344 B]


Ign:9 file:/CDs/ubuntu xenial/restricted amd64 Packages


Get:10 file:/CDs/ubuntu xenial/restricted i386 Packages [8,684 B]


Ign:10 file:/CDs/ubuntu xenial/restricted i386 Packages


Get:11 file:/CDs/ubuntu xenial/restricted Translation-en [2,908 B]


Ign:11 file:/CDs/ubuntu xenial/restricted Translation-en


Get:12 file:/CDs/ubuntu xenial/restricted amd64 DEP-11 Metadata [186 B]


Ign:12 file:/CDs/ubuntu xenial/restricted amd64 DEP-11 Metadata


Get:13 file:/CDs/ubuntu xenial/universe amd64 Packages [7,532 kB]


Ign:13 file:/CDs/ubuntu xenial/universe amd64 Packages


Get:14 file:/CDs/ubuntu xenial/universe i386 Packages [7,512 kB]


Ign:14 file:/CDs/ubuntu xenial/universe i386 Packages


Get:15 file:/CDs/ubuntu xenial/universe Translation-en [4,354 kB]


Ign:15 file:/CDs/ubuntu xenial/universe Translation-en


Get:16 file:/CDs/ubuntu xenial/universe amd64 DEP-11 Metadata [3,410 kB]


Ign:16 file:/CDs/ubuntu xenial/universe amd64 DEP-11 Metadata


Get:17 file:/CDs/ubuntu xenial/universe DEP-11 64x64 Icons [7,448 kB]


Ign:17 file:/CDs/ubuntu xenial/universe DEP-11 64x64 Icons


Get:18 file:/CDs/ubuntu xenial/multiverse amd64 Packages [144 kB]


Ign:18 file:/CDs/ubuntu xenial/multiverse amd64 Packages


Get:19 file:/CDs/ubuntu xenial/multiverse i386 Packages [140 kB]


Ign:19 file:/CDs/ubuntu xenial/multiverse i386 Packages


Get:20 file:/CDs/ubuntu xenial/multiverse Translation-en [106 kB]


Ign:20 file:/CDs/ubuntu xenial/multiverse Translation-en


Get:21 file:/CDs/ubuntu xenial/multiverse amd64 DEP-11 Metadata [63.8 kB]


Ign:21 file:/CDs/ubuntu xenial/multiverse amd64 DEP-11 Metadata


Get:22 file:/CDs/ubuntu xenial/multiverse DEP-11 64x64 Icons [230 kB]


Ign:22 file:/CDs/ubuntu xenial/multiverse DEP-11 64x64 Icons


Get:4 file:/CDs/ubuntu xenial/main amd64 Packages [1,558 kB]


Get:5 file:/CDs/ubuntu xenial/main i386 Packages [1,552 kB]


Get:6 file:/CDs/ubuntu xenial/main Translation-en [799 kB]


Ign:6 file:/CDs/ubuntu xenial/main Translation-en


Get:7 file:/CDs/ubuntu xenial/main amd64 DEP-11 Metadata [2,189 kB]


Err:7 file:/CDs/ubuntu xenial/main amd64 DEP-11 Metadata


 File not found -/CDs/ubuntu/dists/xenial/main/dep11/Components-amd64.yml (2: No such file or directory)


Get:8 file:/CDs/ubuntu xenial/main DEP-11 64x64 Icons [481 kB]


Err:8 file:/CDs/ubuntu xenial/main DEP-11 64x64 Icons


 File not found -/CDs/ubuntu/dists/xenial/main/dep11/icons-64x64.tar (2: No such file or directory)


Reading package lists... Done 


E: Failed to fetch file:/CDs/ubuntu/dists/xenial/main/dep11/Components-amd64.yml File not found -/CDs/ubuntu/dists/xenial/main/dep11/Components-amd64.yml (2: No such file or directory)


E: Failed to fetch file:/CDs/ubuntu/dists/xenial/main/dep11/icons-64x64.tar File not found -/CDs/ubuntu/dists/xenial/main/dep11/icons-64x64.tar (2: No such file or directory)


E: Some index files failed to download. They have been ignored, or old ones used instead.



/var/lib/apt/lists 里我什么都没有。 partial 目录中只有部分信息:


#/var/lib/apt/lists/partial# ls -l


total 7308


-rw-r--r-- 1 root root 7228243 Apr 22 09:37 _CDs_ubuntu_dists_xenial_main_binary-amd64_Packages


lrwxrwxrwx 1 root root 54 May 13 10:25 _CDs_ubuntu_dists_xenial_main_binary-amd64_Packages.gz ->/CDs/ubuntu/dists/xenial/main/binary-amd64/Packages.gz


lrwxrwxrwx 1 root root 53 May 13 10:25 _CDs_ubuntu_dists_xenial_main_binary-i386_Packages.gz ->/CDs/ubuntu/dists/xenial/main/binary-i386/Packages.gz


-rw-r--r-- 1 root root 245864 Apr 22 11:24 _CDs_ubuntu_dists_xenial_Release


-rw-r--r-- 1 root root 933 Apr 22 11:24 _CDs_ubuntu_dists_xenial_Release.gpg



问题只能通过从 trusty 降级到 apt 1.1来解决。

另外 apt-get update 尝试将它存储的文件的权限更改为 /var/lib/apt/list 中的符号链接。 例如它更改了 file:的访问权限


/CDs/ubuntu/dists/xenial/main/binary-amd64/Packages.gz



关于如何在 repo 16.04中使用 apt 1.2和本地的建议?


回答 1:

为了与Ubuntu中的apt 1.2一起使用,你需要删除这个版本

/etc/apt/apt.conf.d/50appstream

使用:

sudo rm/etc/apt/apt.conf.d/50appstream


回答 2:

对我来说只是删除


/etc/apt/apt.conf.d/50appstream



我已经下载了,因为我已经下载了 amd64 软件包,所以没有成功。 为了让它正常工作,我将架构添加到 sources.list


deb [arch=amd64] file:/wherever xenial main restricted universe multiverse


...etc.



完成这个工作之后 apt-get update 工作良好。


回答 3:

我也有同样的问题,我试图解决这个问题


sudo rm/etc/apt/apt.conf.d/50appstream



但这对我不起作用。 我在这里看到了关于它的一个可能的Bug。

在任何情况下,我找到一个选择,并且对我工作很好

打开存储库并执行fallowing命令的目录:


python -m SimpleHTTPServer <port>



在任何文件夹中启动web服务器是一个简单的方法,在中可以看到这个,如何在任何文件夹中轻松启动web服务器

所以现在你可以像使用 sources.list 一样使用了。 例如我使用的是 por,这是我的。


deb http://localhost:8585/xenial main multiverse restricted universe



deb http://localhost:8585/xenial-backports main multiverse restricted universe



deb http://localhost:8585/xenial-proposed main multiverse restricted universe



deb http://localhost:8585/xenial-security main multiverse restricted universe



deb http://localhost:8585/xenial-updates main multiverse restricted universe



是快速解决方案,我相信这样的解决方案更加强大。




文章标签:rep  REPO  LOC  Repository  Ubuntu  Local  GET  APT  

Copyright © 2011 HelpLib All rights reserved.    知识分享协议 京ICP备05059198号-3  |  如果智培  |  酷兔英语