LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-05-2014, 12:15 PM   #1
agooodname
LQ Newbie
 
Registered: Jun 2013
Location: Chicago IL USA
Distribution: debian
Posts: 23

Rep: Reputation: Disabled
Question Debian server unable to use apt-get/aptitude command


I have a toshiba satalite laptop that im trying to turn into a debian sever running vsftpd. The problem occurs when I try to run any apt-get or aptitude command. Durring the server installation I was unable to connect to any repositories so i opted to skip what was going to be installed from the repositories and just install the barebones version that was contained on the live cd I suspect this might be the problem but I am not sure what to do about it.

su apt-get install openssh-server returns

Quote:
reading package list... done
building dependendcy tree
reading state info... done
some packages could no be installed. This may mean you have requsted an impossible situation or you are using an unstable distrobution that some required packages have not yet been created or been moved out of incoming
The following info may help resove your situation:

The following packages have unmet dependencies:
openssh-server : Depends: Libwrap0 (>= 7.6-4~) but it is not installable
E:unable to corect problems you have held broken packages.
apt-get install vsftpd returns
Quote:
reading package list... done
building dependendcy tree
reading state info... done
E: unable to locate package vsftpd
the update comand works however and returns

Quote:
Get : 1 http://security.debian.org wheezy/updates Release.gdg [836 b]
Get : 2 http://security.debian.org wheezy/updates Release [102 kB]
Get : 3 http://security.debian.org wheezy/updates/main Sources [108 kB]
Get : 4 http://security.debian.org wheezy/updates/main amd64 Pakages [183 kB]
Get : 5 http://security.debian.org wheezy/updates/main Translation-en [101 kB]
fetched 495 kB in 2s (175 kB/s)
reading package lists... Done
I am a complete novice with linux but i think the problem might lie with me using a repository that specilises in security software only, could ths be a possibility? Any help is greatly appreaciated.
 
Old 06-05-2014, 01:21 PM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
I think it's because you don't have the repositories correctly setup.
Please post your /etc/apt/sources.list - here's mine (running Mint, not pure Debian):
Code:
deb http://packages.linuxmint.com/ maya main upstream import
deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ precise partner
# deb http://packages.medibuntu.org:8080 precise free non-free
 
Old 06-05-2014, 01:41 PM   #3
agooodname
LQ Newbie
 
Registered: Jun 2013
Location: Chicago IL USA
Distribution: debian
Posts: 23

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pingu View Post
I think it's because you don't have the repositories correctly setup.
Please post your /etc/apt/sources.list - here's mine (running Mint, not pure Debian):
Code:
deb http://packages.linuxmint.com/ maya main upstream import
deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ precise partner
# deb http://packages.medibuntu.org:8080 precise free non-free
thanks for the quick reply unfortunately every time i try to open /etc/apt/sources.list i keep getting the message "permission denied" even though im running as root.
 
Old 06-05-2014, 01:46 PM   #4
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
That is very strange, should not be possible.
Please post permissions & your username, that is output of:
Code:
ls -l /etc/apt/sources.list
ls -l /etc/apt
whoami
 
Old 06-05-2014, 02:19 PM   #5
agooodname
LQ Newbie
 
Registered: Jun 2013
Location: Chicago IL USA
Distribution: debian
Posts: 23

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pingu View Post
That is very strange, should not be possible.
Please post permissions & your username, that is output of:
Code:
ls -l /etc/apt/sources.list
ls -l /etc/apt
whoami

ls -l /etc/apt/sources.list
Code:
-rw-r--r-- 1 root root 329 jum 5 00:25 /etc/apt/sources.list
whoami
Code:
root
i just tried to view sources.list again and got the permission denied message
Code:
bash: /etc/apt/sources.list: Permission denied
 
Old 06-05-2014, 02:26 PM   #6
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Ah, I see!
You really *are* a newbie! :-)
Ok, here's first lesson:
When you just enter "/etc/apt/sources.list" at the command prompt, bash (the shell, the thing that receives your commands) tries to *execute* the file. In other words, you are trying to run a program named /etc/apt/sources.list.
It fails of course.
What you want to do is read the content of the file, you can do that with 'cat':
"cat /etc/apt/sources.list"
So 'cat' tells bash you want it to write out contents of a file, then you specify which file (on the same line)
Hope it's clear, just keep asking if not.
--- Edit:
And 'cat' is an executable, like a program that takes an argument.

Last edited by pingu; 06-05-2014 at 02:28 PM. Reason: Clearifying (hopefully...)
 
Old 06-05-2014, 02:44 PM   #7
agooodname
LQ Newbie
 
Registered: Jun 2013
Location: Chicago IL USA
Distribution: debian
Posts: 23

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pingu View Post
Ah, I see!
You really *are* a newbie! :-)
Ok, here's first lesson:
When you just enter "/etc/apt/sources.list" at the command prompt, bash (the shell, the thing that receives your commands) tries to *execute* the file. In other words, you are trying to run a program named /etc/apt/sources.list.
It fails of course.
What you want to do is read the content of the file, you can do that with 'cat':
"cat /etc/apt/sources.list"
So 'cat' tells bash you want it to write out contents of a file, then you specify which file (on the same line)
Hope it's clear, just keep asking if not.
--- Edit:
And 'cat' is an executable, like a program that takes an argument.
ah that make a ton of sense thanks, my sources.list file reads (I didn't bother to write out the cdrom part put if it will help just ask)
Code:
deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
 
Old 06-05-2014, 03:02 PM   #8
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Good, now we're getting somewhere! :-)
So the problem is simply the one you suggested yourself - "... i opted to skip what was going to be installed from the repositories..."
You need to add repositories (do you know what that is? The following will still work if you don't, but you do need to understand it as well).
Here is one example of a sources.list to start with:
Code:
deb http://http.debian.net/debian wheezy main
deb-src http://http.debian.net/debian wheezy main

deb http://http.debian.net/debian wheezy-updates main
deb-src http://http.debian.net/debian wheezy-updates main

deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
If you also want the contrib and non-free components, add contrib non-free after main.

You could also generate one, here's a page I found:
http://debgen.simplylinux.ch/
(I take no responsibility for that page, it looks good but all I did was google. I have no experience with that site.)
After adding sane repositories you need to refresh (you've done this before):
apt-get update

Last edited by pingu; 06-05-2014 at 03:03 PM.
 
Old 06-05-2014, 03:11 PM   #9
agooodname
LQ Newbie
 
Registered: Jun 2013
Location: Chicago IL USA
Distribution: debian
Posts: 23

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pingu View Post
Good, now we're getting somewhere! :-)
So the problem is simply the one you suggested yourself - "... i opted to skip what was going to be installed from the repositories..."
You need to add repositories (do you know what that is? The following will still work if you don't, but you do need to understand it as well).
Here is one example of a sources.list to start with:
Code:
deb http://http.debian.net/debian wheezy main
deb-src http://http.debian.net/debian wheezy main

deb http://http.debian.net/debian wheezy-updates main
deb-src http://http.debian.net/debian wheezy-updates main

deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
If you also want the contrib and non-free components, add contrib non-free after main.

You could also generate one, here's a page I found:
http://debgen.simplylinux.ch/
(I take no responsibility for that page, it looks good but all I did was google. I have no experience with that site.)
After adding sane repositories you need to refresh (you've done this before):
apt-get update
Thank you so much, ill edit the file and try out repositories you suggest.
 
Old 06-05-2014, 04:03 PM   #10
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Do that, hope it works!
It's bedtime here in my part of the world so if you need more advice hopefully someone else can fill in.
Otherwise I'm back tomorrow.
Good luck!
 
  


Reply

Tags
apt-get, debian, debian repositories, laptop, server


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 configure apt-get/aptitude server on ubuntu niharikaananth Linux - Newbie 2 02-12-2012 12:01 AM
apt-get or aptitude server pk_kala Debian 1 06-27-2007 05:55 AM
Debian 4 Stable - dpkg/apt-get/aptitude - Database reading issue? Brian Ryans Debian 1 05-18-2007 04:09 AM
Debian aptitude - apt-get problem mikek147 Linux - Distributions 1 09-15-2002 07:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:53 PM.

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
Open Source Consulting | Domain Registration