0

I setup a local repository for a few packages. Here is the directory structure of the repository:

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

the /etc/apt/sources.list has the following entry:

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 update

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

Try apt-get install:

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

Any tips on debugging the above problem?

Solution: I ended up creating a trivial repository structure to get it working:

This is the new structure:

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

The /etc/apt/sources.list has the following entry:

deb http://repo1/dists /

Now I am able to do apt-get update followed by apt-get install openvswitch-common

  • That's an incorrectly-structured apt repo. Binary deb files should be in a pool folder. See the Ubuntu archive for the proper structure. How did you set up your repo? – saiarcot895 Aug 4 '14 at 15:46
  • Also, you can use file://path/to/repo instead so that apt knows it's a local repo. – saiarcot895 Aug 4 '14 at 15:47
  • I created the Packages.gz file with the following command: dpkg-scanpackages binary /dev/null | gzip -9c > binary-amd64/Packages.gz. I am also doing apt-get from a different machine so file:// won't work. Still not sure how to setup pool. Is there a simple way to do it? – user310399 Aug 4 '14 at 16:11
  • I use reprepro to set up a local repo using this guide. It's written for Debian, but it can easily be used for Ubuntu. Note that (if you use this method) for Architectures, do not include all. – saiarcot895 Aug 4 '14 at 16:24
  • I ended up trying with trivial repository setup and it seems to be working now. I created a folder under the webroot and put both deb files and Packages file under that directory. Thanks for the help. – user310399 Aug 4 '14 at 16:30
1

Solution: I ended up creating a trivial repository structure to get it working:

This is the new structure:

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

The /etc/apt/sources.list has the following entry:

deb http://repo1/dists /

Now I am able to do apt-get update followed by apt-get install openvswitch-common

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.