0

I'm working on a virgin debian 5 image on a VPS. To be honest, this may not be the brightest VPS provider in the world and I suspect their image isn't perfect.

apt-get fails for everything:

# apt-get -y install gcc
Reading package lists... Done
Building dependency tree... Done
E: Couldn't find package gcc

There is an /etc/apt/sources.list:

# cat /etc/apt/sources.list
deb http://ftp.debian.org/debian lenny main contrib non-free
deb http://ftp.debian.org/debian-volatile lenny/volatile main contrib non-free
deb http://ftp.debian.org/debian-security lenny/updates main contrib non-free

...which I think is correct.

Now if I use apt-cache, I find it:

# apt-cache search gcc
libgcc1 - GCC support library
gcc-4.3-base - The GNU Compiler Collection (base package)

To be honest, I'm not the world's strongest Debian guy. Anyone care to speculate where I should start to fix this problem?

1
  • Doesn't apt-get clean && apt-get update help?
    – HUB
    Apr 20, 2011 at 17:08

2 Answers 2

2

Try 'apt-get -y install gcc-4.3-base'

EDIT: To add, unless I'm mistaken, the reason why is because the package is called gcc-4.3-base not just gcc.

5
  • Paul, that worked great. But something is still wrong. apt-cache search aptitude returns nothing. after apt-getting gcc-4.3-base, I still don't get gcc (ran find / and didn't find a 'gcc').
    – raindog
    Apr 20, 2011 at 17:25
  • You can use apt-cache search $package_name to search
    – Sameer
    Apr 20, 2011 at 17:29
  • 1
    Dumb question... when was your last apt-get update?
    – Hyppy
    Apr 20, 2011 at 18:11
  • Not a dumb question at all - that turned out to be the issue. My faith in this VPS vendor is dropping moment by moment...good thing it only cost me $15/year :-) Thanks for all the help.
    – raindog
    Apr 20, 2011 at 21:04
  • to be fair the VPS provider has done nothing wrong. To get the latest package list you will always need to do an update, and the error you were suffering from was because you were typing in the wrong package name.
    – Ardesco
    Apr 28, 2011 at 10:37
1

What about:

apt-get update
apt-get install build-essential
apt-get install gcc

The package build-essential for lenny (link) should keep you from chasing other missing packages (libs) if you're heading for building sources.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .