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.

Peter Mortensen
  • 2,319
  • 5
  • 23
  • 24
Dane O'Connor
  • 1,199
  • 2
  • 14
  • 20
  • 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 '10 at 21:44

4 Answers4

23

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.

Asheesh Laroia
  • 346
  • 1
  • 4
  • 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? – Dane O'Connor Mar 29 '10 at 01:33
  • If you need to do this often and don't like having to go through all the steps, check this out: http://www.eyrie.org/~eagle/software/scripts/backport.html – ptman Mar 29 '10 at 07:19
  • I updated the answer above to answer TheDeeno's question. – Asheesh Laroia Mar 30 '10 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 – Shadur Sep 26 '11 at 08:45
  • Shouldn't apt-src be run with sudo? – Cerin Feb 08 '17 at 02:15
  • While useful, this particular answer misses one important step: adding the keys used to sign the repo. `for id in 8B48AD6246925553 7638D0442B90D010; do apt-key adv --recv-key $id --keyserver hkp://pool.sks-keyservers.net:80; done`. In my case the use of port :80 was necessary due to company firewall. It also appears to be quite important to install the recommendations along with `apt-src`, so if you have tweaked your defaults this would be another trap to fall into. – 0xC0000022L Nov 15 '18 at 22:14
  • While the comment above addreses the issue, I still get `Err:4 http://ftp.debian.org/debian unstable InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138` – Maruf Jan 23 '21 at 08:01
  • Try for both the keys "sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys " – Prashant Oct 13 '21 at 05:29
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.

Johan
  • 746
  • 5
  • 20
1

Don't do that.

But: Guake is present in:

You only have to enable the 'universe' repository.

Peter Mortensen
  • 2,319
  • 5
  • 23
  • 24
raerek
  • 648
  • 7
  • 12
  • It's in intrepid and jaunty, too: http://packages.ubuntu.com/intrepid/x11/guake http://packages.ubuntu.com/jaunty/x11/guake – Dennis Williamson Mar 27 '10 at 21:10
  • hmm, I have guake installed 0.4.0 installed i'm trying to install 0.4.1 though. Is that in one of those repositories? Am I missing it? I updated my question to be more specific. – Dane O'Connor Mar 27 '10 at 21:49
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

A B
  • 101
  • 2