11

I'm trying to install a package from a Debian repository. I am trying to install manually with dpkg errors because of missing or incomplete dependencies. This got me wondering, is it a mistake to just add the Debian repository to my apt sources?

To be more specific I'm trying to install Guake (the console wrapper).

I'm trying to install Guake 0.4.1. This resolves an issue with transparency I'm having.

1
  • 4
    serverfault is for questions related to server/network administration. This question seems like it is more about your desktop environment which makes it more suitable for superuser.
    – Zoredache
    Mar 27, 2010 at 21:44

4 Answers 4

24

It's a bad idea to install binary packages from Debian on Ubuntu. But it's a good idea to install packages from source! So here's how:

It's not that hard. Here's how to do it (instructions taken from my old note at http://www.asheesh.org/note/backporting-with-apt-src.html ):

Step 1: Make sure you have an appropriate deb-src line

Backporting is the process of taking source packages and compiling them on your Debian(-like) system. The easiest way to find Debian "source packages" is the same way you find Debian "binary packages": apt-get and its configuration.

Make sure you have this line in /etc/apt/sources.list:

deb-src http://ftp.debian.org/debian/ unstable main

APT provides a command "apt-get source" that looks in these deb-src lines (rather than plain binary deb lines) and downloads source packages. In this tutorial, you'll use "apt-src" which is a convenient wrapper around "apt-get source".

Step 2

apt-get update

Step 3

sudo aptitude install apt-src

apt-src is a helper program that makes compiling source packages easy. It's not necessary, but it prevents you from having to type too many commands.

Step 4

 apt-src -bi install $package

If you wanted to install 'alpine', run this:

apt-src -bi install alpine

The "b" stands for "build", the "i" stands for "install the resulting package", and the word "install" means "download the source for alpine as found in a Debian source line from sources.list". apt-src will "install" the source into the current directory, make sure you have all the required packages to build the package (a process called "satisfying the build dependencies"), build it, and install the resulting .debs.

8
  • This is an awesome guide. +1 and accept if I get it to work. Quick question, I don't understand how the apt-src program knows to use the deb-src repo and not a karmic repo. Can you shed some light on that? Mar 29, 2010 at 1:33
  • If you need to do this often and don't like having to go through all the steps, check this out: eyrie.org/~eagle/software/scripts/backport.html
    – ptman
    Mar 29, 2010 at 7:19
  • I updated the answer above to answer TheDeeno's question. Mar 30, 2010 at 20:17
  • I wouldn't call it a good idea per se -- even the build dependencies still expect an essentially Debian setup -- but it's definitely significantly less bad than installing a binary. +1 Sep 26, 2011 at 8:45
  • Shouldn't apt-src be run with sudo?
    – Cerin
    Feb 8, 2017 at 2:15
1

That is probably not the best way, as Debian and Ubuntu have different system paths, library versions and other dependencies. It might work though, but it will most probably fail in some way. You could get a better answer if you specified which package you are trying to install.

Conclusion: I would not recommend you doing it, other than for experimental use.

1
  • added package to my question Mar 27, 2010 at 20:27
1

Don't do that.

But: Guake is present in:

You only have to enable the 'universe' repository.

2
0

There was mention of the command:

 add-apt-repository ppa:nginx/stable

at http://railscasts.com/episodes/335-deploying-to-a-vps?view=asciicast

Not the answer you're looking for? Browse other questions tagged .