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
Related
I am trying to install wordpress following this tutorial but in the section where I have to install the following
sudo apt install php php-cli php-fpm php-json php-pdo php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath -y
I have the following output:
The php-pdo package is a virtual package provided by:
php8.2-common 8.2.0~rc5-1+ubuntu22.04.1+deb.sury.org+1
php8.1-common 8.1.12-1+ubuntu22.04.1+deb.sury.org+1
php8.0-common 1:8.0.25-1+ubuntu22.04.1+deb.sury.org+1
php7.4-common 1:7.4.32-2+ubuntu22.04.1+deb.sury.org+1
php7.3-common 7.3.33-8+ubuntu22.04.1+deb.sury.org+1
php7.2-common 7.2.34-36+ubuntu22.04.1+deb.sury.org+1
php7.1-common 7.1.33-50+ubuntu22.04.1+deb.sury.org+2
php7.0-common 7.0.33-63+ubuntu22.04.1+deb.sury.org+2
php5.6-common 5.6.40-63+ubuntu22.04.1+deb.sury.org+2
You need to explicitly select one to install
E: The package "php-pdo" does not have a candidate for installation
does anyone know why this is happening?
pd: i'm using Linux Mint 21
I am trying install libapache2-mod-php7.3 on my ubuntu server 16.04.
I am getting below error
sudo apt install libapache2-mod-php7.3
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libapache2-mod-php7.3
E: Couldn't find any package by glob 'libapache2-mod-php7.3'
E: Couldn't find any package by regex 'libapache2-mod-php7.3'
Please help me install the libapache2 module on my server.
Thanks
Have you tried this?
sudo add-apt-repository ppa:ondrej/php
sudo apt-get install php7.3 php7.3-cli php7.3-mysql php7.3-gd php7.3-imagick php7.3-recode php7.3-tidy php7.3-xmlrpc php7.3-common php7.3-curl php7.3-mbstring php7.3-xml php7.3-bcmath php7.3-bz2 php7.3-intl php7.3-json php7.3-readline php7.3-zip
sudo apt install libapache2-mod-php7.3
sudo a2enmod php7.3
after successfully installing, execute :
sudo service apache2 restart
FYI, I recommended you use the latest PHP or switch to the LTS version.
You can find out on https://www.php.net/supported-versions.php
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.
I'm trying to get my server re-setup as a Lemp stack
The issue I am now running into is installing PHP 7 without Apache, since nGinx will be my webserver.
So, I've added ppa:ondrej/php. ran apt-get update, and tried to install just php7.0 via apt-get install php7.0
--nodeps flag does not work, as I am on Ubuntu 15.10
And I am presented with:
The following extra packages will be installed:
apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php7.0 libapr1
libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.1-0 libqdbm14
php-common php-readline php7.0 php7.0-cli php7.0-common php7.0-json
php7.0-opcache php7.0-readline
Suggested packages:
apache2-doc apache2-suexec-pristine apache2-suexec-custom php-pear
php-user-cache
The following NEW packages will be installed:
apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php7.0 libapr1
libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.1-0 libqdbm14
php php-common php-readline php7.0 php7.0-cli php7.0-common php7.0-json
php7.0-opcache php7.0-readline
I do not want apache anywhere near my server, so how can I install php7 without it? Short of compiling from source (as this makes it difficult at best to keep it updated)
If you just request php7.0, it'll install Apache as default. Do apt-get install php7.0-fpm and it'll install as FPM instead, leaving something like nginx up to you.
Use the command:
sudo apt install php7.2 php7.2-common php7.2-cli php7.2-fpm
It will require the php7.2 dependencies in strict mode (WITHOUT apache2).
On Ubuntu 18.04 I managed to do this successfully with:
sudo apt-get install php7.2-cli
In Ubuntu 20.04, php 7.4 is the default.
Thus, without adding any PPAs, all you need is
apt install php-fpm
This will bring in a few libraries, including php-cli, but NO apache-related things.
With the following steps you can install any PHP version you want, just replace 7.4 with your desired version.
Also I am suggesting to install the cli package because I assume you dont want to have fpm installed. Otherwise you can install php7.4-fpm instead.
Install ppa:ondrej/php repositories
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
Install PHP
sudo apt install php7.4-cli
You will get the following:
The following additional packages will be installed:
php-common php7.4-common php7.4-json php7.4-opcache php7.4-readline
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