Unable to install PHP libcurl on Ubuntu Linux

advertisements

I am trying to use the new facebook api and it requires libcurl PHP. I used

sudo apt-get install php5-curl
sudo apachectl -k restart

And it didn't work. I get the same error and the phpinfo() page says nothing about libcurl.

The source of this problem is probably that I built some of the tools from source (apache2, php), but then I got bored so installed a lot of the extensions with the package manager. But I'm not exactly how to go about diagnosing the point of failure.

The apt-get install for curl definitely worked, and can be found in

/usr/lib/php5/20060613/curl.so

I think a lot of my confusion stems from not knowing which files go where, and what purpose they have. Any help would be appreciated, and please tell me if I need to provide more information.

edit: The specific error I get is:

Exception: Facebook needs the CURL PHP extension.

from line

if (!function_exists('curl_init')) {
  throw new Exception('Facebook needs the CURL PHP extension.');
}

Ubuntu: 9.10

PHP: 5.2.13

Loaded Configuration File: /etc/php5/apache2/php.ini


In general it's a bad idea to mix and match software from your distribution's package manager with stuff you've built yourself. The package manager will not know anything about the stuff you've built yourself and so can get confused.

Not only that but who's to say the stuff from the package manager is even binary compatible with the stuff you've built yourself? If you build it all yourself then at least you know it will all be compatible.

Sounds to me like you should uninstall the extensions and build them yourself. If you can't or don't want to do that then go back and install apache and friends through your package manager but I would recommend having patience and going for the former option.