Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I installed Debian 6 Squeez on my virtual machine and I can't install software using aptitude or apt-get. This is my sources.list file:

root@debian:/etc/apt# cat sources.list
# 

# deb cdrom:[Debian GNU/Linux 6.0.5 _Squeeze_ - Official i386 DVD Binary-1 20120512-13:45]/ squeeze contrib main

deb cdrom:[Debian GNU/Linux 6.0.5 _Squeeze_ - Official i386 DVD Binary-1 20120512-13:45]/ squeeze contrib main

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

# squeeze-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/ squeeze-updates main contrib
# deb-src http://ftp.debian.org/debian/ squeeze-updates main contrib
root@debian:/etc/apt# 

I tried commenting the cdrom lines, I also tried to add some sources I found on the net but none of them are working. Can anyone tell me why the default sources.list file doesn't have the appropriate configuration so I can easily aptitude install lftp for example? What can I do to install software from their repositories?

share|improve this question
    
Have you tried exec: apt-get update after save changes at sources.list file? –  sgmart Aug 14 '13 at 18:56
    
can anyone tell me why the downvotes? :) maybe next time i won't make the same mistakes –  Jason Swartz Aug 14 '13 at 19:38

3 Answers 3

up vote 2 down vote accepted

As I can see, you don't have the main (non-updates, non-security) repositories (I wonder why). This is how should look your sources.list:

deb http://archive.debian.org/debian oldstable main contrib
deb http://ftp.debian.org/debian/ squeeze-updates main contrib
deb http://security.debian.org/ squeeze/updates main contrib

After this, you should run:

sudo apt-get update
sudo apt-get upgrade

Now you can install the lftp package with just:

sudo apt-get install lftp
share|improve this answer
    
This is the default sources.list after installing debian...I also wonder why –  Jason Swartz Aug 14 '13 at 19:39
    
Added the lines but lftp is still not found. I also get Err http://archive.debian.org oldstable/main i386 Packages 404 Not Found [IP: 130.89.148.13 80] , Err http://archive.debian.org oldstable/contrib i386 Packages 404 Not Found [IP: 130.89.148.13 80] and W: There is no public key available for the following key IDs: 8B48AD6246925553 after sudo aptitude update –  Jason Swartz Aug 14 '13 at 19:46
    
yes, but No candidate version found for debian-keyring...since I don't have the right sources :( Can anyone tell me why aren't the default sources ok? –  Jason Swartz Aug 14 '13 at 19:59
    
It can't find the address: Connecting to ftp.us.debian.org|128.61.240.89|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2013-08-14 16:07:32 ERROR 404: Not Found. –  Jason Swartz Aug 14 '13 at 20:07

In order to install new packages you must edit your sources.list file, save changes, exec:

apt-get update

and finally:

apt-get install some_package_name

All as superuser of course!

share|improve this answer

Comment out each "deb cdrom:" line, and add the line

deb http://security.debian.org/ squeeze main contrib

to your sources.list, then

$ sudo aptitude update
$ sudo aptitude install [package name]

If you're trying to install a package from Testing/Experimental, add

deb http://ftp.debian.org/debian experimental main

to your sources.list, then grab a package using

$ sudo aptitude update
$ sudo aptitude -t experimental install [package name]
share|improve this answer
    
Oh, I was looking for the lftp package and I couldn't find it, where can I find the testing and other repositories? And why aren't they in the sources.list file? Is there any chance to find lftp there? I can find it on packages.debian.org but not on the repos, why is that? –  Jason Swartz Aug 14 '13 at 19:26
    
@cepkos he doesn't even have the main repositories in his sources.list –  Braiam Aug 14 '13 at 19:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.