10

I want to run this in Debian 8.1

sudo add-apt-repository -y ppa:nemh/systemback
sudo apt-get update
sudo apt-get install systemback

but I cannot find add-apt-repository in Debian 8.1 and its apt-file search/apt-cache search.

Is Debian's way of changing the source just editing the file /etc/apt/sources.list?

1 Answers1

20

The add-apt-repository command is part of the software-properties-common package in Debian 8.x (jessie). Once you've installed software-properties-common, you'll have add-apt-repository available and you can use it to add PPA repositories.

Note: Be sure that the packages you're installing are compatible with Debian. If the packages are only available for Ubuntu and you need to install the package that is the "best match" to your Debian release, you'll need to adjust the appropriate repository entry, for example to change the release from jessie to utopic or vivid (by default, the repository will be added with the release name that matches your Debian release, as you'd expect).

For example

From:

deb http://ppa.launchpad.net/nemh/systemback/ubuntu jessie main 
deb-src http://ppa.launchpad.net/nemh/systemback/ubuntu jessie main

To:

deb http://ppa.launchpad.net/nemh/systemback/ubuntu vivid main 
deb-src http://ppa.launchpad.net/nemh/systemback/ubuntu vivid main
mjturner
  • 7,300
  • I have Debian Jessie i.e. 8.1 so the first two lines should work. That is a good point! Do you know what this command sudo add-apt-repository -y ppa:nemh/systemback inserts by default? For Jessie or Vivid? – Léo Léopold Hertz 준영 Jul 13 '15 at 10:15
  • 1
    @Masi The problem is that the package probably isn't available for jessie, so you'll need to install the package from the closest match Ubuntu release (possibly vivid). To do that, you need to change the repository entry. – mjturner Jul 13 '15 at 10:16
  • Is this ppa:nemh/systemback available in Jessie? How did you look it up? It is better to use just supported software for me. – Léo Léopold Hertz 준영 Jul 13 '15 at 10:29
  • 2
    @Masi There doesn't appear to be a package for Debian, only Ubuntu. See the package page on Launchpad. Yes, ideally you shouldn't install Ubuntu packages on a Debian system. What you can do is rebuild the Ubuntu package on a Debian system and then install that package - your dependencies will then be 100% correct. The backporting instructions should be a good starting point. – mjturner Jul 13 '15 at 10:39
  • The first link does not work after additing those lines to /etc/apt/sources.list and running apt-get update getting W: Failed to fetch http://ppa.launchpad.net/nemh/systemback/ubuntu/dists/jessie/main/source/Sources 404 Not Found; W: Failed to fetch http://ppa.launchpad.net/nemh/systemback/ubuntu/dists/jessie/main/binary-amd64/Packages 404 Not Found. Of course, like you said, I should use Vivid's ones but do not like so the software is not supported in my debian. – Léo Léopold Hertz 준영 Jul 13 '15 at 10:42
  • 1
    @Masi Yes, hence my comment that you'd need to change jessie to the name of the "best match" Ubuntu distribution. There is no package for jessie on that repository. – mjturner Jul 13 '15 at 10:43