php7.2 fpm无法安装redis

时间:2018-05-11 00:28:25

标签: php redis apt-get

我最近在debian上安装了php7.2

#!/bin/bash

apt-get install apt-transport-https lsb-release ca-certificates
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/php.list
apt-get update
apt-get install php7.2-fpm php7.2-cli php7.2-xml
apt-get install php-curl
apt-get install php7.2-mysql

# Si apache
apt install libapache2-mod-php
a2enconf php7.2-fpm
service php7.0-fpm restart
service php7.2-fpm restart
a2dismod php7.0
a2enmod php7.2
service apache2 restart

当我尝试安装php-redis时,(对于apache)我在安装子库时遇到错误

Preparing to unpack .../php-igbinary_2.0.1-1+0~20170825111222.1+jessie~1.gbp48b058_amd64.deb ...
Unpacking php-igbinary (2.0.1-1+0~20170825111222.1+jessie~1.gbp48b058) ...
dpkg: error processing archive /var/cache/apt/archives/php-igbinary_2.0.1-1+0~20170825111222.1+jessie~1.gbp48b058_amd64.deb (--unpack):
 trying to overwrite '/etc/php/7.0/mods-available/igbinary.ini', which is also in package php7.0-igbinary 2.0.1-1~dotdeb+8.1
Errors were encountered while processing:
 /var/cache/apt/archives/php-igbinary_2.0.1- 1+0~20170825111222.1+jessie~1.gbp48b058_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

为了修理它,我试着清理     apt-get purge php-redis     apt-get purge php-igbinary     apt-get clean

我尝试重新安装后:

root@ns327838:~# apt-get install php7.2-redis
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'php-redis' instead of 'php7.2-redis'
The following extra packages will be installed:
  php-igbinary
The following NEW packages will be installed:
  php-igbinary php-redis
0 upgraded, 2 newly installed, 0 to remove and 66 not upgraded.
Need to get 326 kB of archives.
After this operation, 2,317 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://packages.sury.org/php/ jessie/main php-igbinary amd64 2.0.1-1+0~20170825111222.1+jessie~1.gbp48b058 [43.4 kB]
Get:2 https://packages.sury.org/php/ jessie/main php-redis amd64 4.0.0-1+0~20180412074203.5+jessie~1.gbp24a357 [282 kB]
Fetched 326 kB in 0s (654 kB/s)    
(Reading database ... 62943 files and directories currently installed.)
Preparing to unpack .../php-igbinary_2.0.1-1+0~20170825111222.1+jessie~1.gbp48b058_amd64.deb ...
Unpacking php-igbinary (2.0.1-1+0~20170825111222.1+jessie~1.gbp48b058) ...
dpkg: error processing archive /var/cache/apt/archives/php-igbinary_2.0.1-1+0~20170825111222.1+jessie~1.gbp48b058_amd64.deb (--unpack):
 trying to overwrite '/etc/php/7.0/mods-available/igbinary.ini', which is also in package php7.0-igbinary 2.0.1-1~dotdeb+8.1
Selecting previously unselected package php-redis.
Preparing to unpack .../php-redis_4.0.0-1+0~20180412074203.5+jessie~1.gbp24a357_amd64.deb ...
Unpacking php-redis (4.0.0-1+0~20180412074203.5+jessie~1.gbp24a357) ...
Errors were encountered while processing:
 /var/cache/apt/archives/php-igbinary_2.0.1-1+0~20170825111222.1+jessie~1.gbp48b058_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

你有什么想法吗?

提前谢谢

0 个答案:

没有答案