Unable to locate package php7.3-mysql
Ok, I am setting up a new server and I have installed NGINX. Now I want to install Mariadb with PHp support for 7.3 so I ran the command
sudo apt install mariadb-server php7.3-mysql
I get the output
E: Unable to locate package php7.3-mysql
E: Couldn't find any package by glob 'php7.3-mysql'
E: Couldn't find any package by regex 'php7.3-mysql'
I thought I should install the Php 7.3 for the MYSQl support since I will be using php 7.3. It seems running the command:
sudo apt install mariadb-server php-mysql
install the php 7.2 version. So, how do I get the command "Unable to locate package php7.3-mysql" to run? or can I use php 7.2 in MYSQl but use php fpm 7.3 for the wordpress?
Any help is grateful.
This is a tricky one for sure. It took me a little poking around to figure it out but it seems that the source of this issue is that you need to add some additional sources before you can install php7.3-mysql.
I'll break it down by distro:
You are going to need to add the following sources to your /etc/apt/sources.list file.
Don't forget that after this you are going to have to run
sudo apt-get update to use the new repositories.
-8 and 9-
sudo apt -y install lsb-release apt-transport-https ca-certificates
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php7.3.list
And then just like Ubuntu you'll have to run
sudo apt update
sudo yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum -y install epel-release yum-utils
For CentOS you are going to have to disable to default package, which is php5.4, and enable to 7.3 package.
sudo yum-config-manager --disable remi-php54
sudo yum-config-manager --enable remi-php73
This should help you get rolling. If there are any other issues just add a post and I'm sure someone will be able to help you out.
CentOS does not need an update once you have the repository enabled.