skip to Main Content

We are upgrading from ubuntu 14 to ubuntu 16, but are encountering problems installing php-redis. We’re trying to get php-redis for php 5.6 but php-redis for php8.0 is being installed instead. When specifying the version e.g.

sudo apt-get install php5.6-redis

we get the following error:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php5.6-redis
E: Couldn't find any package by glob 'php5.6-redis'
E: Couldn't find any package by regex 'php5.6-redis'

we looked into https://launchpad.net/~ondrej/+archive/ubuntu/php/ but it seems this would only work for ubuntu 18+

any help is much appreciated on how we can install php-redis for php 5.6 on ubuntu 16

2

Answers


  1. if you dont install the Redis itself on your ubuntu then you need to install it first by this command:

    sudo apt-get install redis-server
    

    after enabling it:

    sudo systemctl enable redis-server.service
    

    install the php extenstion:

    sudo apt-get install php5.6-redis
    
    Login or Signup to reply.
  2. If you installed Redis you can continue with this:

    First you need to add repository:

    sudo apt-add-repository -y ppa:ondrej/php
    

    Then update APT:

    sudo apt-get update
    

    Finally, install php-redis from apt:

    sudo apt-get install php-redis
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search