About program recompilation

Asked by OO279 on 2011-06-02

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

Language:
English Edit question
Status:
Answered
For:
Ubuntu php5 Edit question
Assignee:
No assignee Edit question
Last query:
2011-06-02
Last reply:
2011-06-06

https://launchpad.net/~ondrej/+archive/php5

Has the 5.3.6 which according to:
http://www.php.net/

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

OO279 (279-b) said : #2

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

Axel H. (staff-pro-unreal) said : #3

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?

OO279 (279-b) said : #4

Situation:

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.

Axel H. (staff-pro-unreal) said : #5

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.