I want to install a package of Php Redis

What is this?

--This is a record of your struggles when installing Php Redis.

environment

--Use AWS EC2 server - Amazon Linux2 --PHP version → 7.4.6 --Redis version → 6.3.0 --PHP and Redis are already installed.

I tried it

Check if there is Php Redis

--Please match the part of php74 with yours

yum list | grep php74 | grep redis

Execution result スクリーンショット 2020-06-11 10.18.02.png

It looks like it's kind of nice. But I want to install Php Redis. I'm curious that the name is a little different. Check the contents once.

What is php74-php-pecl-redis5.x86_64?

yum info php74-php-pecl-redis5.x86_64

Execution result スクリーンショット 2020-06-11 10.24.57.png

Let's jump to Link shown in result. スクリーンショット 2020-06-11 10.27.02.png

Let's jump to Homepage. スクリーンショット 2020-06-11 10.28.59.png

I'm going to Php Redis' GitHub. That is, php74-php-pecl-redis5.x86_64 in the yum repository is the same as PhpRedis.

Now let's install Php Redis. There is also a way to build the source, but it is now possible to install the package. There is no way not to use it w

yum insatall php74-php-pecl-redis5.x86_64

Execution result スクリーンショット 2020-06-10 11.25.34.png

This is an error. It seems that the package: ** liblzf ** is missing to contain php74-php-pecl-redis5.x86_64.

liblzf Take a look at liblzf's Home Page (http://software.schmorp.de/pkg/liblzf.html). liblzf seems to be a library for data compression. Searching for the installation method of liblzf does not hit easily. I couldn't find anything like that in the yum list. Therefore, I referred to the following image part of the site of here.

スクリーンショット 2020-06-12 10.23.32.png

The image shows how to use rmp instead of yum. And it seems that having epel installed is a prerequisite for installing liblzf. I already have epel in my environment. If you need it, install epel. The explanation of epel is omitted here.

Install liblzf.

yum install liblzf --enablerepo=epel

Execution result スクリーンショット 2020-06-10 12.11.46のコピー.png

Install Php Redis

After the liblzf installation is complete, install PhpRedis again.

yum insatall php74-php-pecl-redis5.x86_64 --enablerepo=remi

Execution result It looks good. スクリーンショット 2020-06-10 12.12.15のコピー.png

Installation confirmation

yum list installed | grep liblzf
yum list installed | grep redis 

Execution result スクリーンショット 2020-06-10 12.14.39のコピー.png

Summary

--Php Redis can be installed as a package. --However, there are various package dependency problems, so it is necessary to install the missing package in each environment each time. In my case it was liblzf. --Installing liblzf ――The pitfall this time was that it was in epel, not in the yum repository.

reference

Recommended Posts

I want to install a package of Php Redis
I want to install a package from requirements.txt with poetry
I want to find a popular package on PyPi
I want to start a lot of processes from python
NikuGan ~ I want to see a lot of delicious meat! !!
I want to print in a comprehension
I want to build a Python environment
I want to pip install with PythonAnywhere
How to install a package using a repository
I want to sort a list in the order of other lists
I want to color a part of an Excel string in Python
Python: I want to measure the processing time of a function neatly
I want to make matplotlib a dark theme
I want to easily create a Noise Model
I want to INSERT a DataFrame into MSSQL
I want to create a window in Python
I want to perform SageMaker inference from PHP
I want to make a game with Python
I don't want to take a coding test
I want to get League of Legends data ③
I want to get League of Legends data ②
I want to create a plug-in type implementation
I want to easily find a delicious restaurant
I want to customize the appearance of zabbix
I want to get League of Legends data ①
I want to write to a file with Python
I want to upload a Django app to heroku
I want to display only different lines of a text file with diff
The story of IPv6 address that I want to keep at a minimum
I failed to install django with pip, so a reminder of the solution
I want to set a life cycle in the task definition of ECS
I want to add silence to the beginning of a wav file for 1 second
I want to see a list of WebDAV files in the Requests module
I want to create a web application that uses League of Legends data ①
I want to embed a variable in a Python string
I want to detect images of cats from Instagram
I want to iterate a Python generator many times
I want DQN Puniki to hit a home run
100 image processing knocks !! (021-030) I want to take a break ...
I want to give a group_id to a pandas data frame
I want to generate a UUID quickly (memorandum) ~ Python ~
I want to transition with a button in flask
I want to grep the execution result of strace
I want to climb a mountain with reinforcement learning
I want to write in Python! (2) Let's write a test
I have a private Python package but I want to install pipenv on GitHub Actions and build a Docker Image
I want to randomly sample a file in Python
I want to fully understand the basics of Bokeh
I want to easily build a model-based development environment
I want to split a character string with hiragana
[Python] I want to make a nested list a tuple
I want to manually create a legend with matplotlib
I want to send a business start email automatically
I want to run a quantum computer with Python
I want to bind a local variable with lambda
I want to increase the security of ssh connections
I want to collect a lot of images, so I tried using "google image download"
I want to take a screenshot of the site on Docker using any font
I want to use a network defined by myself in PPO2 of Stable Baselines
I want a mox generator
I want to solve Sudoku (Sudoku)