Meu conf: Ubuntu 11.10, já instalei o mysql, php5 e apache2, antes de instalar o php5-curl no terminal que fiz:
edite a lista de fontes como:
sudo -H gedit /etc/apt/sources.list
você pode verificar sua configuração no link
Próximo comando:
apt-get install aptitude
Próximo comando:
aptitude install php5-curl
Você recebe algo assim:
The following NEW packages will be installed:
php5-curl{b}
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 27.1 kB of archives. After unpacking 127 kB will be used.
The following packages have unmet dependencies:
php5-curl: Depends: php5-common (= 5.3.6-13ubuntu3.1) but 5.3.6-13ubuntu3.8 is installed.
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) php5-curl [Not Installed]
Accept this solution? [Y/n/q/?] n
Sua resposta aqui é n
As próximas linhas são impressas:
The following actions will resolve these dependencies:
Downgrade the following packages:
1) libapache2-mod-php5 [5.3.6-13ubuntu3.8 (now) -> 5.3.6-13ubuntu3.1 (oneiric)]
2) php5 [5.3.6-13ubuntu3.8 (now) -> 5.3.6-13ubuntu3.1 (oneiric)]
3) php5-cli [5.3.6-13ubuntu3.8 (now) -> 5.3.6-13ubuntu3.1 (oneiric)]
4) php5-common [5.3.6-13ubuntu3.8 (now) -> 5.3.6-13ubuntu3.1 (oneiric)]
5) php5-gd [5.3.6-13ubuntu3.8 (now) -> 5.3.6-13ubuntu3.1 (oneiric)]
6) php5-mysql [5.3.6-13ubuntu3.8 (now) -> 5.3.6-13ubuntu3.1 (oneiric)]
Accept this solution? [Y/n/q/?] y
Sua resposta aqui é y.
No seu navegador, abra phpinfo (), verifique a propriedade:
extension_dir /usr/lib/php5/20090626+lfs
Nessa pasta, você deve ter curl.so
Edite o arquivo php.ini
nano /etc/php5/apache2/php.ini
encontre "extensões dinâmicas" adicione o código abaixo:
extension=curl.so
Depois disso, reinicie o apache2 e verifique phpinfo (), o curl deve estar ativado