Thursday, February 3, 2011

Tasksel not installing PHP

Sorry for the newbie question, but I'm having issues with tasksel.

I tried to install lamp-server, but php5 isn't installed.

user@host:/var/www$ aptitude show apache2 | grep -i installed
State: installed
Automatically installed: no
user@host:/var/www$ aptitude show mysql-server | grep -i installed
State: installed
Automatically installed: no
user@host:/var/www$ aptitude show php5 | grep -i installed
State: not installed
 This package is a metapackage that, when installed, guarantees that you have at
 least one of the three server-side versions of the PHP5 interpreter installed.
user@host:/var/www$

In the above, I'm in /var/www because I created an info.php file to see if there was possibly some other version of php running I wasn't aware of, but there's not.

During installation, I had to fill out items for mysql (root password), and if I try to connect to the webserver, I get apache's "It works!" page, but there's no sign of php anywhere, and I can't figure why.

I've never used tasksel before, so I could be misunderstanding something, but could someone let me know what I did wrong?

I'm using Ubuntu 10.04 Server.

  • If you try sudo apt-get -f install, does the prompt just return or does your server continue configuring packages? If something interrupted your previous installation attempt, it might be half-finished.

    Steve : No, it's clean. Tasksel didn't kick out any errors when I ran it before either, that I know of. I just tabbed back to my VM and it was sitting at the bash prompt awaiting orders.
    Janne Pikkarainen : Weird. How about "dpkg -l | grep php", does it return something?
    Steve : libapache2-mod-php, php5-common, and php5-mysql are listed as installed there
    Steve : I just tried `aptitude install php5 -s` and the only thing it found to install was the php5 package itself, saying "20.5kB will be used." I find it odd that a) it would install everything but the meta package, and b) that the metapackage itself would prevent it from working even though the components were all there. Maybe I should just install it (note that i used -s to simulate the install, not actually install it). I'd rather know what went wrong than to just patch it, in case I run into similar issues when I create the production version
    JanC : So PHP5 **is** installed on your system (and you don't need the meta-package). If it doesn't work that sounds more like a configuration or permission issue.
    Steve : @Jan Claeys: Yeah, that's my bad. I only checked the meta-package and tested a simple script (just ran phpinfo()) and when it didn't work I assumed it wasn't installed. This seemed odd to me since whenever I'll installed it manually it worked fine out of the box. So, I just removed it with tasksel and installed it all from scratch and now it works fine. I guess in future I'll just do it that way, since it works well and in every little extra time.
    JanC : Using tasksel should work too, it would have been interesting to know why it didn't...

0 comments:

Post a Comment