Ploblem in installing php5-curl - php

I am trying to install curl module of php by following command on my Ubuntu machine-
sudo apt-get install php5-curl
But it is not getting installed and I am getting following error messages on console. Could you assist me and explain what is happening here. Why are those urls Forbidden?
sudo apt-get install php5-curl
root#XXXXXXXX:/etc/apt# apt-get install php5-curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libapache2-mod-php5 php5-cli php5-common php5-mysql
Suggested packages:
php-pear php5-suhosin
The following NEW packages will be installed:
php5-curl
The following packages will be upgraded:
libapache2-mod-php5 php5-cli php5-common php5-mysql
4 upgraded, 1 newly installed, 0 to remove and 29 not upgraded.
Need to get 6,522kB of archives.
After this operation, 127kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Err http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ maverick-updates/main php5-cli i386 5.3.3-1ubuntu9.10
403 Forbidden
Err http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ maverick-updates/main php5-mysql i386 5.3.3-1ubuntu9.10
403 Forbidden
Err http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ maverick-updates/main libapache2-mod-php5 i386 5.3.3-1ubuntu9.10
403 Forbidden
Err http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ maverick-updates/main php5-common i386 5.3.3-1ubuntu9.10
403 Forbidden
Err http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ maverick-updates/main php5-curl i386 5.3.3-1ubuntu9.10
403 Forbidden
Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/main/p/php5/php5-cli_5.3.3-1ubuntu9.10_i386.deb 403 Forbidden
Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/main/p/php5/php5-mysql_5.3.3-1ubuntu9.10_i386.deb 403 Forbidden
Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/main/p/php5/libapache2-mod-php5_5.3.3-1ubuntu9.10_i386.deb 403 Forbidden
Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/main/p/php5/php5-common_5.3.3-1ubuntu9.10_i386.deb 403 Forbidden
Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/main/p/php5/php5-curl_5.3.3-1ubuntu9.10_i386.deb 403 Forbidden
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I upgraded my distro from ubuntu 10.10 to Ubuntu 12.04 LTS. It solved my problem.

If so, try the following sequence:
sudo apt-get update --fix-missing
sudo apt-get update
sudo apt-get install php5-curl

Related

How to add curl on php7.2 and ubuntu 14

I am trying to install curl on my ubunutu 14 server with php 7.2 installed. I run the following command:
sudo apt-get install php7.0-curl
but it gives error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.0-curl
E: Couldn't find any package by regex 'php7.0-curl'
I then tried to resolve this issue by running commands:
sudo apt-add-repository ppa:ondrej/php
sudo apt-get update
sudo apt install apache2 libapache2-mod-php7.0 php7.0
But that also end up with same "Couldn't find package" error.
Your Ubuntu distro trusty is too old and those packages aren't available. You will have to build the library from the source by yourself.
Here you can find solution your problem How do I install the ext-curl extension with PHP 7?
Shortly, try to execute
sudo apt-get install php-curl
Also you can use sudo apt-cache search curl which shows you available packages for installation.

Unable to install PHP 7.0 with Ubuntu 14.04.02

I executed the commands:
$sudo add-apt-repository ppa:ondrej/php
$sudo apt-get update
$sudo apt-get install php7.0-fpm
And the ouput
Err http://ppa.launchpad.net/ondrej/php/ubuntu/ trusty/main php-common all 1:49+deb.sury.org~trusty+4
404 Not Found
Err http://ppa.launchpad.net/ondrej/php/ubuntu/ trusty/main php7.0-common amd64 7.0.15-1+deb.sury.org~trusty+1
404 Not Found
..................
..................
E: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/pool/main/p/php7.0/php7.0-fpm_7.0.15-1+deb.sury.org~trusty+1_amd64.deb 404 Not Found
The repository has different packages, i can see in "http://ppa.launchpad.net/ondrej/php/ubuntu/pool/main/p/php7.0/" that versiĆ³n 7.0.15 is missing
How can i change local source to download 7.0.31 instead?
Thanks

sudo apt-get install php5-xsl gives an 403 Forbidden error

When installing the php5-xsl package, I get errors:
Err http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main php5-> xsl amd64 5.6.14+dfsg-1+deb.sury.org~trusty+1 403 Forbidden
E: Failed to fetch http://ppa.launchpad.net/ondrej/php55.6/ubuntu/pool/main/p/php5/php5-xsl_5.6.14+dfsg-1+deb.sury.org~trusty+1_amd64.deb 403 Forbidden
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
I tried also this before installing:
sudo apt-get update
sudo apt-get upgrade
But with no luck.
How can I install php5-xsl? I need this in my PHP project because this code gives a fatal error (class not found):
new \XSLTProcessor();
Thank you!

Error 1 ERROR: `make' failed when installing sqlsrv

I'm trying to install sqlsrv by using the commands from this page. However, when running
pecl install sqlsrv-4.2.0preview
I get the error: Error 1 ERROR: 'make' failed.
I tried :
apt-get update
apt-get install build-essential
apt-get install libpcre3-dev
apt-get install make
All of these are installed on the latest version.
I'm running a container using the php:7.0-apache image. Running apachectl -V returns Apache/2.4.10 (Debian).
Here is the full log output from the command I ran: https://pastebin.com/MYDY3xwU
I had this exact error.
/tmp/pear/temp/sqlsrv/shared/xplat.h:30:17: fatal error: sql.h: No such file or directory
#include <sql.h>
Apparently the header file its looking for is only in the package unixODBC-devel.
I installed that package and was able to successfully complete the build. yum install unixODBC-devel.
Possibly, a better explanation is here.
stackoverflow Question # 15447386
I had the following error on Ubuntu 18.04 when installing
/tmp/pear/temp/sqlsrv/shared/xplat.h:30:10: fatal error: sql.h: No such file or directory #include <sql.h>
Installing the package unixodbc-dev as Matthew Goheen proposed solved the issue
sudo apt-get install unixodbc-dev
try
sudo apt-get install unixodbc-dev

Error installing GD Toolkit

I have been trying to install the GD toolkit on my Ubuntu VM. The operation is simple enough:
sudo apt-get install php5-gd
However, when I run this, I get a 404 (Not Found error) for a package:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
php5-gd
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 38.8 kB of archives.
After this operation, 163 kB of additional disk space will be used.
Err http://us.archive.ubuntu.com/ubuntu/ precise-updates/main php5-gd amd64 5.3.10-1ubuntu3.1
404 Not Found [IP: 91.189.92.153 80]
Err http://security.ubuntu.com/ubuntu/ precise-security/main php5-gd amd64 5.3.10-1ubuntu3.1
404 Not Found [IP: 91.189.92.151 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/php5/php5-gd_5.3.10-1ubuntu3.1_amd64.deb 404 Not Found [IP: 91.189.92.151 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Has anyone encountered this problem?
Got the answer from user1190992 apt-get was simply out of date....
This command did the trick:
sudo apt-get update
Internets might be all broken. try
$ curl 91.189.92.153

Categories