Linux-Noob Forums

Full Version: How to rebuild curl 7.22 on latest centos 5.7 linux?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Hi there.

I am new to linux and i am trying to learn.

I have a web server where I host few of my websites. Recently one of my plugins stopped working nd it was traced to curl problems. This is all I know, the programmer who wrote a script told me I need to rebuild curl,

I am noob to linux and I don't want to outsource this task.

I have done yum update so my centos is up to 5.7 stable

so everything is up to the latest version however cURL wouldn't update past 7.15 version.

I would like to update it to the latest 7.22 stable version.

I searched google half a day today and couldn't find an answer.

One of you experts would you please explain to me how to rebuild curl using the latest release available on the internet ?

 

Thank you kindly!

 

Noob


I don't have very much experience in building but I'll try and help. What you basically need to do is untar your package. Via de command line or terminal. Type the following tar -xvf
curl-7.22.0.tar , the package wil unpack. Then you wil need to go into the folder. cd curl-7.22.0 . Once you are in the package all you need to do is run the following commands.

1. ./configure (this command wil give you some output and it may give you some errors, if it gives some errors it wil also mention what are packages/libraries you need to install). Once it runs succesfull without errors you can go to the next step.

2. make

3. make install (you will need to be root for the last command; su - then password)

 

You will need the development tools to do this. In CentOS you can install them like this: yum groupinstall 'Development Tools'

If you look through a source package you will usually find a INSTALL or HELP file. These usually contain usefull information. In this case

it's under curl-7.22.0/docs/INSTALL This file with give you more information about the different options you have for building.

Hope that helps :)


Thank you for your help feedmebits. I have done it and it looked like it was installing it. There were no errors during any of the steps. I restarted apache after I completed install but when i did php.inf I got the same old version of curl showing... 7.15

Thanks again.

 

Any more ideas?

Noob


Quote:Thank you for your help feedmebits. I have done it and it looked like it was installing it. There were no errors during any of the steps. I restarted apache after I completed install but when i did php.inf I got the same old version of curl showing... 7.15


Thanks again.


 

Any more ideas?


Noob
 

I think I found the problem, you need to
compile curl with php
:


 

To use PHP's cURL support you must also compile PHP
--with-curl[=DIR]
where DIR is the location of the directory containing the lib and include directories. In the include directory there should be a folder named curl which should contain the easy.h and curl.h files. There should be a file named libcurl.a located in the lib directory. Beginning with PHP 4.3.0 you can configure PHP to use cURL for URL streams
--with-curlwrappers
.


 

This probably means you have to also compile php from source with the path to the curl directory.


 

Here's an
example
of how it should look


 

Using the example it would something like this when you configure php with apache and php and curl.


./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-curl-/path/to/curl


 

But Hybrid or Dave will be able to help you out a bit more on this cuz my experience on this is limited.



Welcome to the forums! :)

 

The latest version of cURL in the CentOS repositories is 7.15 and cURL support is built-in to the PHP that CentOS ships. While this cURL is older than the version available from the website, there are many benefits from sticking with the CentOS version. It is technically possible to upgrade to 7.22, but it will involve customising a lot of software installations (the whole of PHP) that you can otherwise leave to the CentOS packages, which are much, much easier to manage. (If you do this, you'll no longer get software updates for either cURL or the whole of PHP automatically from the 'yum' tool, making it more difficult to keep your server up-to-date and secure).

 

I would therefore recommend against (re)installing cURL yourself, but if this is really what you want to do, we could help with it.

 

I would suggest instead going back to looking at the source of the problem with one of your plugins. What kind of plugin is it -- for what piece of software? WordPress, Joomla, etc, or something else entirely? Which plugin? Do you have any more details -- an error message perhaps? You might see errors on screen on the web page that this plugin is affecting, but also check the /var/log/httpd/error_log file which might give more details.

 

Let us know how you get on -- with a few more details we might be able to understand the source plugin problem.