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.

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

2 Answers

up vote 3 down vote accepted

Try running apt-get update first.

link|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
2  
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
feedback

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.

link|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 at 8:46
feedback

Your Answer

 
or
required, but never shown