Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created an APT repository using deb-scanpackages, and it seemed to go well.

When I did a apt-get update on another server, the Packages.gz file was retrieved, and all seemed well - until I went to search for the packages contained in that repository (all packages are created locally).

Several recommendations suggested reprepro; I tried that. Same result - except I had to rebuild the packages with the Priority and Section lines in the control file (nothing says this anywhere). The reprepro utility also generates a complicated directory structure which required rewriting the repository entry on the requesting server.

I then found that the arch directory referenced i386 and not amd64 (which was requested by the requesting server).

Is it possible that the AMD64 system isn't seeing packages compiled for i386? Searching the *Packages files in /var/lib/apt/lists show that the only packages for i386 are those I added (the other files are for the server - Ubuntu 10.04.2 LTS).

The server the packages were built on is Ubuntu 10.04.2 LTS i686; the requesting server is x86_64.

I found some discussion at the Debian AMD64FAQ but it claims to be obsolete. It makes mention of an extended syntax for repository listings for APT, and a command dpkg-subarchitecture - neither of which work on the local AMD64 server.

Do I have to build two different sets of packages?

share|improve this question
Why do you say reprepro generates a complicated directory structure? It looks exactly the same as a standard Debian repository, with the addition of just one extra dir for internal use. – Tshepang Feb 18 '11 at 5:45
When I did a dpkg-scanpackages, it merely created a Packages file. When I used reprepro, it created directories like main/ pool/ dists/ and I don't remember what all. All I want is a repo - not an entire replication of the Ubuntu repository. – Mei Feb 18 '11 at 23:41

Yes, you do need to build 2 sets of packages - you cannot install i386 packages on an amd64 system without forcing the installation, which generally should not be done.

share|improve this answer
Can I just switch the Architecture switch in the package's control file to amd64 or do I need an entire tool chain and a recompile? – Mei Feb 17 '11 at 0:24
I'm afraid that it'd need a recompile on amd64 hardware. This is one reason why PPAs are popular, packages are automatically built against multiple architectures – ajmitch Feb 17 '11 at 0:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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