James John – Software Engineer

How to Add Repositories to Debian 8 “jessie”

Moved to Debian 8 recently because it has been my dream to use Debian as an OS of choice, reason is because of the name…funny though but it’s true, once I heard the name I fell in love with it 😀

Installed Debian 8 and noticed they repositories were not available making it not able to install all packages, you might see the file but encounter dependency error because the dependencies might be in another repo which is not in Debian 8. I met this problem and solved it.  You have your Debian 8 up and running then type:

$ sudo nano /etc/apt/sources.list

Which should look like

#

# deb cdrom:[Debian GNU/Linux 8.1.0 _Jessie_ - Official amd64 DVD Binary-1 20150606-14:19]/ jessie contrib main

deb cdrom:[Debian GNU/Linux 8.1.0 _Jessie_ - Official amd64 DVD Binary-1 20150606-14:19]/ jessie contrib main

deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates 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

Firstly, comment out the Live CD repo there by adding # to the beginning of any repo that looks like this

deb cdrom:[Debian GNU/Linux 8.1.0 _Jessie_ - Official amd64 DVD Binary-1 20150606-14:19]/ jessie contrib main

Which makes it look like this

#deb cdrom:[Debian GNU/Linux 8.1.0 _Jessie_ - Official amd64 DVD Binary-1 20150606-14:19]/ jessie contrib main

Now this line

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

And do some editing on each line by adding contrib non-free at the end which makes it look like this:

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

We ain’t done yet, just below it add this line

deb http://http.us.debian.org/debian jessie main contrib non-free

Then save and run

$ sudo apt-get update

You can now install your apps 🙂

James John

Software Engineer