About program recompilation

Asked by OO279

In the past, has set up a server with Ubuntu 10.04 compiled PHP 5.2.13. Or after Ubuntu update installation is required recompile PHP 5.2.13 or any compiled program? By installing the update I think "apt-get upgrade".

Question information

English Edit question
Ubuntu php5 Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :


Has the 5.3.6 which according to:

Is the newest....or do you need the older version?

Revision history for this message
OO279 (279-b) said :

I'm wondering more about whether it is necessary to recompile the program after Ubuntu update. PHP is one example.

Revision history for this message
Axel H. (staff-pro-unreal) said :

Are you compiling php on your own or did you install it with apt-get? What exactly are you doing when you mean compiling?

cd php-5.3.6
./configure && make && make install

Something like that ore are we talking about different things?

Revision history for this message
OO279 (279-b) said :


Download PHP tar.gz file. Then "./configure", "make" and "make install". The result is a precompiled PHP. In my example, it is PHP, but it can also be any other program.

After a month I do "apt-get upgrade". As a result, Ubuntu update. Or after Ubuntu update requires again PHP "./configure", "make" and "make install" to run PHP without problems? PHP version will not change.

Revision history for this message
Axel H. (staff-pro-unreal) said :

From your description it sounds like you've installed php from the repository via apt-get and installed the source version of php 5.3 over it. If so: you must recompile every time apt-get upgrades the repository php version. Clean it up by using only one them (source or repo).
If not: apt-get upgrade may also update libraries required/used by PHP. You may also have to recompile PHP after upgrading in this case as well.

If there is no special reason for using the downloaded php.tar.gz fom php.net you should avoid it and install php via the package management system (this applies to any other program as well). It is not recommended to compile and install software from source if there is a package, ppa or repository which offers an ubuntu binary. If you do you have to take care of dependencies and security fixes on your own (in your case recompiling).

A console based package manager frontend is aptitude. To install type:
sudo apt-get install aptitude

With aptitude you can browse available packages, install, upgrade and remove them.
Then you're on a GUI like gnome you might prefer Synaptic or the Ubuntu Software Center (should be installed already).

Can you help with this problem?

Provide an answer of your own, or ask OO279 for more information if necessary.

To post a message you must log in.