1

I found this part of bash command on a forum and confused as to why there are two parts in it.

sudo apt-get install php5 libapache2-mod-php5 -y

What is libapache2-mod-php5? If thats PHP why is php5 separately used in the expression?

Thanks for any help.

I only need help understanding the bash expression.

1 Answer 1

1

php5:

This package is a metapackage that, when installed, guarantees that you have at least one of the four server-side versions of the PHP5 interpreter installed. Removing this package won't remove PHP5 from your system, however it may remove other packages that depend on this one.

libapache2-mod-php5:

This package provides the PHP5 module for the Apache 2 webserver (as found in the apache2-mpm-prefork package). Please note that this package ONLY works with Apache's prefork MPM, as it is not compiled thread-safe. The following extensions are built in: bcmath bz2 calendar Core ctype date dba dom ereg exif fileinfo filter ftp gettext hash iconv json libxml mbstring mhash openssl pcre Phar posix Reflection session shmop SimpleXML soap sockets SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter zip zlib.

Noting in that command line indicates any reason to require the php5 meta package. It just forces you to install libapache2-mod-php5 (which you are), or one of the alternatives.

Sign up to request clarification or add additional context in comments.

1 Comment

thank you for the explanation. but I am a new beginner. didn't get 90% of that reply. I don't understand as to why you mentioned about removal. I am installing this on a raspberry PI. what could be other packages that are dependent on libapache2-mod-php5? Why cant I simply mention sudo apt-get install php5? what would happen if I do that? I am only instaling mysql,php and apache

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.