LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-12-2012, 04:38 AM   #1
animalcrackers
LQ Newbie
 
Registered: Aug 2012
Distribution: Debian
Posts: 28

Rep: Reputation: Disabled
Using Debian, cant install new programs or update Debian


I keep trying to update my Debian or install games or programs I want but I always get trouble, for an example, I tried to install a game and copied and pasted the results here,
W: Failed to fetch http://http.us.debian.org/debian/pool/main/x/xpuzzles/xpuzzles_7.5-1_i386.deb
Connection failed
using Debian 6.0.3

Last edited by animalcrackers; 09-12-2012 at 04:42 AM. Reason: didnt want the http address to be made into a link, not necessary
 
Old 09-12-2012, 04:40 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,137
Blog Entries: 2

Rep: Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839Reputation: 4839
Please post the output of the commands
Code:
cat /etc/apt/sources.list
apt-get update
 
Old 09-12-2012, 04:45 AM   #3
animalcrackers
LQ Newbie
 
Registered: Aug 2012
Distribution: Debian
Posts: 28

Original Poster
Rep: Reputation: Disabled
ok, here is the output for cat /etc/apt/sources.list
deb cdrom:[Debian GNU/Linux 6.0.3 _Squeeze_ - Official i386 DVD Binary-1 20111008-13:01]/ squeeze contrib main

deb cdrom:[Debian GNU/Linux 6.0.3 _Squeeze_ - Official i386 DVD Binary-1 20111008-13:01]/ squeeze contrib main

# Line commented out by installer because it failed to verify:
# deb http://security.debian.org/ squeeze/updates main contrib
# Line commented out by installer because it failed to verify:
# 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 http://http.us.debian.org/debian/ squeeze contrib main
deb-src http://ftp.debian.org/debian/ squeeze-updates main contrib
and for apt-get update I got
Ign cdrom://[Debian GNU/Linux 6.0.3 _Squeeze_ - Official i386 DVD Binary-1 20111008-13:01] squeeze Release.gpg
Ign cdrom://[Debian GNU/Linux 6.0.3 _Squeeze_ - Official i386 DVD Binary-1 20111008-13:01]/ squeeze/contrib Translation-en
Ign cdrom://[Debian GNU/Linux 6.0.3 _Squeeze_ - Official i386 DVD Binary-1 20111008-13:01]/ squeeze/contrib Translation-en_US
Ign cdrom://[Debian GNU/Linux 6.0.3 _Squeeze_ - Official i386 DVD Binary-1 20111008-13:01]/ squeeze/main Translation-en
Ign cdrom://[Debian GNU/Linux 6.0.3 _Squeeze_ - Official i386 DVD Binary-1 20111008-13:01]/ squeeze/main Translation-en_US
Ign cdrom://[Debian GNU/Linux 6.0.3 _Squeeze_ - Official i386 DVD Binary-1 20111008-13:01] squeeze Release
Ign cdrom://[Debian GNU/Linux 6.0.3 _Squeeze_ - Official i386 DVD Binary-1 20111008-13:01] squeeze/contrib i386 Packages/DiffIndex
Ign cdrom://[Debian GNU/Linux 6.0.3 _Squeeze_ - Official i386 DVD Binary-1 20111008-13:01] squeeze/main i386 Packages/DiffIndex
Err http://http.us.debian.org squeeze Release.gpg
Connection failed
50% [Waiting for headers] [Waiting for headers]
 
Old 09-12-2012, 05:12 AM   #4
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Rep: Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636
You are trying to update from a cd rom.

You need to change the sources.list to stop apt looking for a cd rom and actually look at the repositories. To do this open a terminal and type in
Code:
su
then type in your password. You waont see anything come up but type it anyway and hit enter.

Once you have done that type in
Code:
gedit /etc/apt/sources.list
it will look something like this
Code:
deb cdrom:[Debian GNU/Linux 6.0.3 _Squeeze_ - Official i386 DVD Binary-1 20111008-13:01]/ squeeze contrib main

deb cdrom:[Debian GNU/Linux 6.0.3 _Squeeze_ - Official i386 DVD Binary-1 20111008-13:01]/ squeeze contrib main

# Line commented out by installer because it failed to verify:
# deb http://security.debian.org/ squeeze/updates main contrib
# Line commented out by installer because it failed to verify:
# deb-src http://security.debian.org/ squeeze/updates main contrib
but we want to change it to look like this
Code:
deb http://ftp.debian.org/debian squeeze main contrib non-free
deb http://ftp.debian.org/debian/ squeeze-updates main contrib non-free
deb http://security.debian.org/ squeeze/updates main contrib non-free
The # is called a comment and putting that infront of a line stops the program from reading that line, likewise removing a # from infront of a line makes the program read it.

After you have done this save it and close gedit, then type in the terminal
Code:
apt-get update
and then type in
Code:
apt-get upgrade
this will update your repository list and then upgrade (update) your system after you have done that you can install anything you want.

Let us know how you go.

EDIT: This is a really good site to help you create a sources.list

Last edited by k3lt01; 09-12-2012 at 05:19 AM. Reason: Add a link to Debian sources.list generator
 
1 members found this post helpful.
Old 09-12-2012, 05:15 AM   #5
VDP76
Member
 
Registered: Apr 2010
Location: Bayreuth, Germany
Distribution: CrunchBang Linux (#!)
Posts: 111

Rep: Reputation: 19
hi animalcrackers,
looks like apt-get tries to update preferentially from Debian's installer DVD (which I guess is not inserted).
open a terminal and type
Code:
sudo gedit /etc/apt/sources.list
comment (insert a heading #) the two lines starting with deb cdrom, save and re-issue
Code:
sudo apt-get update
By the way, just to be sure, is the internet connection working fine!?

EDIT: yeap, exactly as explained by k3lt01...

Last edited by VDP76; 09-12-2012 at 05:17 AM.
 
Old 09-12-2012, 05:27 AM   #6
animalcrackers
LQ Newbie
 
Registered: Aug 2012
Distribution: Debian
Posts: 28

Original Poster
Rep: Reputation: Disabled
well, k3lt01 I tried to do as you said, i typed in su and pressed enter, but it didnt say anything, but I tried typing in my password anyways, but it didnt do anything. then I tried the next thing, gedit /etc/apt/sources.list,
and it said,

No protocol specified

(gedit:6755): Gtk-WARNING **: cannot open display: :0.0
root@root:/home/marco# sudo gedit /etc/apt/sources.list
No protocol specified

(gedit:6757): Gtk-WARNING **: cannot open display: :0.0

and since it didnt say what you said it would, I posted the results above,
And for VDP76, i did what you said and got problems too.
when I typed in sudo gedit /etc/apt/sources.list I got
sudo gedit /etc/apt/sources.list
No protocol specified

(gedit:6793): Gtk-WARNING **: cannot open display: :0.0



...oh, and the internet is great.

Last edited by animalcrackers; 09-12-2012 at 05:28 AM.
 
Old 09-12-2012, 05:31 AM   #7
rubankumars
Member
 
Registered: Oct 2010
Location: india
Distribution: debian 8,debian 9,slackware 14.2
Posts: 158

Rep: Reputation: 12
You can find what repositories lines to be inserted in sources.list from website debgen.simplylinux.ch
 
1 members found this post helpful.
Old 09-12-2012, 05:41 AM   #8
animalcrackers
LQ Newbie
 
Registered: Aug 2012
Distribution: Debian
Posts: 28

Original Poster
Rep: Reputation: Disabled
oh, and I tried to open and edit the sources.list file, but in the permissions it says I am not the owner and dont have write permissions.
Im still confused about a lot of things like this, how do I get the program to recognize me as root?
 
Old 09-12-2012, 05:43 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,698

Rep: Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291
Quote:
root@root:/home/marco# sudo gedit /etc/apt/sources.list
No protocol specified
'root' is already in use. Then do not type sudo !
This will do : gedit /etc/apt/sources.list

If gedit isn't working, use another editor :
vim /etc/apt/sources.list
joe /etc/apt/sources.list
nano /etc/apt/sources.list
leafpad /etc/apt/sources.list
... or whatever editor you have installed.

.
 
1 members found this post helpful.
Old 09-12-2012, 05:55 AM   #10
animalcrackers
LQ Newbie
 
Registered: Aug 2012
Distribution: Debian
Posts: 28

Original Poster
Rep: Reputation: Disabled
alright, i tried opening gedit without the sudo command, and it worked, and I pasted what k3lt01 said it should look like and tried apt-get update and it only went so far, it did this,
Err http://ftp.debian.org squeeze Release.gpg
Connection failed
0% [Waiting for headers] [Waiting for headers]
and it stayed at 0% until I killed it.
I also checked out the link he gave me for creating my own sources.list and tried pasting that into it but it also didnt work, there was something wrong with a line that I didnt understand...
 
Old 09-12-2012, 06:04 AM   #11
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Rep: Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636
Could you post exactly what you have typed in and exactly what output it comes back with please. Telling us you tried what we said without showing us what you actually typed doesn't help us much unfortunately. Also when you tell us could you put it in code box the # at the top of the reply to thread box.
 
1 members found this post helpful.
Old 09-12-2012, 06:16 AM   #12
animalcrackers
LQ Newbie
 
Registered: Aug 2012
Distribution: Debian
Posts: 28

Original Poster
Rep: Reputation: Disabled
Ok, sorry about that,
alright, so I typed in
Code:
gedit /etc/apt/sources.list
and replaced everything with
Code:
deb http://ftp.debian.org/debian squeeze main contrib non-free
deb http://ftp.debian.org/debian/ squeeze-updates main contrib non-free
deb http://security.debian.org/ squeeze/updates main contrib non-free
and I saved it and closed it and typed in the command
Code:
apt-get update
and it gave me this,
Code:
0% [Waiting for headers] [Waiting for headers] [Waiting for headers]
so after a while of it staying at 0% I typed
Code:
^C
and killed it and showed you guys what I got
 
Old 09-12-2012, 06:21 AM   #13
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Rep: Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636
Correct me if I am wrong but this is the same machine you are posting on LQ with isn't it? I'm just making sure you aren't posting here with a different machine than the one we are trying to help you update.

What country are you in? If you can tell us that we can adjust your sources.list with your country code and that may help. for example Australia would look like this.
Code:
deb http://ftp.au.debian.org/debian squeeze main contrib non-free
deb http://ftp.debian.org/debian/ squeeze-updates main contrib non-free
deb http://security.debian.org/ squeeze/updates main contrib non-free

Last edited by k3lt01; 09-12-2012 at 06:22 AM.
 
Old 09-12-2012, 06:25 AM   #14
animalcrackers
LQ Newbie
 
Registered: Aug 2012
Distribution: Debian
Posts: 28

Original Poster
Rep: Reputation: Disabled
Yes, I am trying to fix the same laptop that Im using to post to LQ, and I live in the United States.
And I really appreciate all of your help, Ill try to be as informative as possible to help you help me .
 
Old 09-12-2012, 06:27 AM   #15
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Rep: Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636
OK try this instead
Code:
deb http://ftp.us.debian.org/debian stable main contrib non-free
deb http://ftp.debian.org/debian/ squeeze-updates main contrib non-free
deb http://security.debian.org/ squeeze/updates main contrib non-free
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to update Debian install spartman Debian 10 05-20-2013 11:57 AM
Debian APT-Get. Can't retrieve/install any programs. ittiandro Linux - Newbie 3 01-15-2011 07:45 PM
how can i install debian 5.06 in my pc i have downloaded debian-update-5.0.6-i386-DVD siddtanu Debian 2 10-21-2010 02:56 PM
Problem while apt-get update on debian etch, cannot reach security.debian.org sarajevo Debian 4 06-08-2008 11:59 AM
how do i install programs using debian kjcvel Linux - Software 3 09-25-2005 10:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration