未找到本地存储库的 apt-get 包

未找到本地存储库的 apt-get 包

我为一些软件包设置了一个本地存储库。以下是存储库的目录结构:

dists
dists/precise
dists/precise/main
dists/precise/main/binary-amd64
dists/precise/main/binary-amd64/python-openvswitch_2.1.2-51_all.deb
dists/precise/main/binary-amd64/Packages.bz2
dists/precise/main/binary-amd64/Packages
dists/precise/main/binary-amd64/Packages.gz
dists/precise/main/binary-amd64/openvswitch-switch_2.1.2-51_amd64.deb
dists/precise/main/binary-amd64/openvswitch-datapath-dkms_2.1.2-51_all.deb
dists/precise/main/binary-amd64/Release
dists/precise/main/binary-amd64/openvswitch-common_2.1.2-51_amd64.deb

/etc/apt/sources.list 有以下条目:

deb http://archive.ubuntu.com//ubuntu  precise main restricted universe multiverse
deb http://archive.ubuntu.com//ubuntu  precise-updates main restricted universe multiverse
deb http://archive.ubuntu.com//ubuntu  precise-security main restricted universe multiverse
deb http://repo1 precise main

sudo apt-get 更新

Ign http://repo1 precise Release.gpg
Ign http://repo1 precise Release
Ign http://repo1 precise/main amd64 Packages/DiffIndex
Ign http://repo1 precise/main TranslationIndex
Hit http://repo1 precise/main amd64 Packages
Ign http://repo1 precise/main Translation-en_US
Ign http://repo1 precise/main Translation-en
Hit http://archive.ubuntu.com precise Release.gpg
Hit http://archive.ubuntu.com precise-updates Release.gpg
Hit http://archive.ubuntu.com precise-security Release.gpg
Hit http://archive.ubuntu.com precise Release
Hit http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools Release.gpg
Hit http://archive.ubuntu.com precise-updates Release
Hit http://archive.ubuntu.com precise-security Release
Hit http://archive.ubuntu.com precise/main amd64 Packages
Hit http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools Release
Hit http://archive.ubuntu.com precise/restricted amd64 Packages
Hit http://archive.ubuntu.com precise/universe amd64 Packages
Hit http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools/main amd64 Packages
Hit http://archive.ubuntu.com precise/multiverse amd64 Packages
Hit http://archive.ubuntu.com precise/main TranslationIndex
Hit http://archive.ubuntu.com precise/multiverse TranslationIndex
Ign http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools/main TranslationIndex
Hit http://archive.ubuntu.com precise/restricted TranslationIndex
Hit http://archive.ubuntu.com precise/universe TranslationIndex
Hit http://archive.ubuntu.com precise-updates/main amd64 Packages
Hit http://archive.ubuntu.com precise-updates/restricted amd64 Packages
Hit http://archive.ubuntu.com precise-updates/universe amd64 Packages
Hit http://archive.ubuntu.com precise-updates/multiverse amd64 Packages
Hit http://archive.ubuntu.com precise-updates/main TranslationIndex
Hit http://archive.ubuntu.com precise-updates/multiverse TranslationIndex
Hit http://archive.ubuntu.com precise-updates/restricted TranslationIndex
Hit http://archive.ubuntu.com precise-updates/universe TranslationIndex
Hit http://archive.ubuntu.com precise-security/main amd64 Packages
Hit http://archive.ubuntu.com precise-security/restricted amd64 Packages
Hit http://archive.ubuntu.com precise-security/universe amd64 Packages
Hit http://archive.ubuntu.com precise-security/multiverse amd64 Packages
Hit http://archive.ubuntu.com precise-security/main TranslationIndex
Hit http://archive.ubuntu.com precise-security/multiverse TranslationIndex
Hit http://archive.ubuntu.com precise-security/restricted TranslationIndex
Hit http://archive.ubuntu.com precise-security/universe TranslationIndex
Hit http://archive.ubuntu.com precise/main Translation-en
Ign http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools/main Translation-en_US
Hit http://archive.ubuntu.com precise/multiverse Translation-en
Ign http://ubuntu-cloud.archive.canonical.com precise-updates/cloud-tools/main Translation-en
Hit http://archive.ubuntu.com precise/restricted Translation-en
Hit http://archive.ubuntu.com precise/universe Translation-en
Hit http://archive.ubuntu.com precise-updates/main Translation-en
Hit http://archive.ubuntu.com precise-updates/multiverse Translation-en
Hit http://archive.ubuntu.com precise-updates/restricted Translation-en
Hit http://archive.ubuntu.com precise-updates/universe Translation-en
Hit http://archive.ubuntu.com precise-security/main Translation-en
Hit http://archive.ubuntu.com precise-security/multiverse Translation-en
Hit http://archive.ubuntu.com precise-security/restricted Translation-en
Hit http://archive.ubuntu.com precise-security/universe Translation-en
Reading package lists... Done

尝试 apt-get 安装:

sudo apt-get install python-openvswitch
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-openvswitch

对于调试上述问题有什么建议吗?

解决方案:我最终创建了一个简单的存储库结构来使其工作:

这是新的结构:

dists
dists/python-openvswitch_2.1.2-51_all.deb
dists/Packages.bz2
dists/Packages
dists/Packages.gz
dists/openvswitch-switch_2.1.2-51_amd64.deb
dists/openvswitch-datapath-dkms_2.1.2-51_all.deb
dists/openvswitch-common_2.1.2-51_amd64.deb

/etc/apt/sources.list 有以下条目:

deb http://repo1/dists /

现在我可以执行 apt-get update,然后执行 apt-get install openvswitch-common

答案1

解决方案:我最终创建了一个简单的存储库结构来使其工作:

这是新的结构:

dists
dists/python-openvswitch_2.1.2-51_all.deb
dists/Packages.bz2
dists/Packages
dists/Packages.gz
dists/openvswitch-switch_2.1.2-51_amd64.deb
dists/openvswitch-datapath-dkms_2.1.2-51_all.deb
dists/openvswitch-common_2.1.2-51_amd64.deb

/etc/apt/sources.list 有以下条目:

deb http://repo1/dists /

现在我可以这样apt-get updateapt-get install openvswitch-common

相关内容