1

I have a friend who has installed Debian from home burned CDs. But when we try to apt-get new packages (eg. Audacity, Emacs) his installation doesn't recognise them ("not available from this source")

It feels like he's lost the main Debian repository from his sources. In /etc/apt/sources.list he only has

deb http://security.debian.org/ jessie/updates main contrib
deb-src http://security.debian.org/ jessie/updates contrib main

# jessie-updates, previously known as 'volatile'
# A network mirror was not selected during install. The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.

deb http://ftp.debian.org/debian/ jessie-updates main contrib
deb-src http://ftp.debian.org/debian/ jessie-updates main contrib

Do these include the main Debian repository? Or just the "updates"? For example, a package calld audactiy-data is visible but not audacity itself.

If so, how can we add the main repository again? What's its address?

1
  • Unless you intend to download and rebuild source packages, comment out all deb-src lines. You can always uncomment them if/when you need to rebuild a package. I use these aliases: alias apt-source-on='sed -i -e "s/^#\(deb-src\)/\1/" /etc/apt/sources.list /etc/apt/sources.list.d/*' and alias apt-source-off='sed -i -e "s/^\(deb-src\)/#\1/" /etc/apt/sources.list /etc/apt/sources.list.d/*' in my root shell. add sudo before the seds if you want to run them as a non-root user. Commented Jul 22, 2016 at 17:50

2 Answers 2

2

I have had this problem so many times I 'wrote it down'

# tested works
# jessie updates
deb http://ftp.us.debian.org/debian/ jessie main contrib non-free
deb http://mirror.cogentco.com/debian/ jessie main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
# source list
deb-src http://ftp.us.debian.org/debian jessie main contrib non-free
deb-src http://security.debian.org/jessie/updates main contrib non-free
5
  • Don't forget to sudo apt-get update after adding these to sources.list Commented Jul 21, 2016 at 20:09
  • super fast debian (and others) mirror Commented Jul 21, 2016 at 20:17
  • It might be "super fast" from whereever you are, but it won't be from everywhere (it looks like it's on the wrong side of the atlantic ocean for me = quite slow compared to numerous other mirrors), so please don't make that kind of statement without qualification. Commented Jul 21, 2016 at 20:32
  • 1
    He don't need to add non free repo to install Emac and Audacity , It can be installed following the answer of @Stephen Harris Commented Jul 21, 2016 at 20:37
  • Thanks .. exactly what we needed. Any idea why we don't get something working as a default? Commented Jul 21, 2016 at 20:38
2

You only have the updates listed.

The base repo you're missing is at

deb http://ftp.debian.org/debian/ jessie main contrib
deb-src http://ftp.debian.org/debian/ jessie main contrib
3
  • Any idea how / why we didn't have these main repos? Commented Jul 21, 2016 at 20:38
  • If he installed from a local CD then it might have had a 'local CD' entry that your friend removed after it started causing errors when the CD wasn't available. Commented Jul 21, 2016 at 20:40
  • 1
    The answer is in your sources.list = A network mirror was not selected during install Commented Jul 21, 2016 at 20:43

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.