Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Trying out sudo apt-get install apache2, this is what I get:

root@x27:/home/test# sudo apt-get install apache2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Couldn't find package apache2

Appreciate help for using apt-get for apache.

share|improve this question
Is this on ubuntu or debian? –  pauska May 12 '10 at 10:38
ubuntu.............. –  dave May 12 '10 at 10:39

2 Answers 2

up vote 3 down vote accepted

Try running apt-get update first.

share|improve this answer
done... that got apache running, now apt-get install mysql does not seem to be found is it mysql or another term? –  dave May 12 '10 at 10:46
try apt-cache search mysql –  ptman May 12 '10 at 10:51
It's mysql-server or mysql-client depending on what you want. Next time try using apt-cache search $SEARCH_TERM, aptitude search $SEARCH_TERM or packages.ubuntu.com yourself. –  joschi May 12 '10 at 10:54

A good tip for finding packages:

apt-cache search KEYWORD | grep KEYWORD

e.g. apt-cache search mysql | grep mysql

apt-cache search will rattle off a lot of noise sometimes, which is why I use the grep pipe.

share|improve this answer
Don't forget apt-cache policy PACKAGENAME to show which one will be installed (version and source) –  Tom O'Connor Apr 12 '12 at 8:46

Your Answer


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