How can I install packages from Debian's squeeze repo on Ubuntu 12.10?
Solution 1:
general warning
In general mixing Debian and Ubuntu is not a good idea, because there are some slight differences.
Keep in mind the Ubuntu releases are not a branch of the current Debian stable. Normally the packages are synchronized with Debian unstable some time before the Ubuntu release is finished.
Also some special Ubuntu patches may have been applied.
Mixing Debian and Ubuntu repositories will likely render your system unmaintainable. The package dependencies may introduce contradictions which leads to a deadlock situation.
possible solutions
adding Debian repository to apt
You have been warned above.
If you insist to try it, you can add the Debian DVD to your /etc/apt/sources.list
. See man sources.list
for details
manual install with dpkg
- Install the Debian package with
dpkg --force-depends <package.deb>
. - Afterwards try to resolve the missing dependencies with
apt-get install -f
. - If one dependency can't be satisfied by Ubuntu, go back to 1. and install it also this way.
This is better as the 1st approach, but over the time you can run in dependencies problems, if you update your system with apt-get upgrade
.
use Launchpad ppa
My advice is that you create a Launchpad account and a ppa repository.
Also install the ubuntu-dev-tools
package.
With the following command you can fetch a Debian source and try to compile it for Ubuntu:
backportpackage --upload=ppa:${LAUNCHPAD_USER}/${PPA_NAME} --source=squeeze --destination=quantal ${SOURCE_PACAKGE}
To install it, simply use apt-add-repository
to add your ppa repository to your apt configuration.
This way is maybe a little bit more complicated, but will help you to ensure that the dependencies are not getting broken.
using ubuntu packages in debian
As above with switching debian with ubuntu and vice versa.
The warning applies as before.
Instead of using a launchpad ppa, you have to grab the sources manually from ubuntu and try to compile them with e.g. pbuilder
yourself.
Likely it will fail, if you using debian squeeze because ubuntu quantal is as written above a "fork" from debian unstable.