Как установить Расширение Redis PHP 5.6 в Ubuntu 14

Раньше мы устанавливали расширение PHP Redis с помощью PECL. Но похоже, что PECL отказался от поддержки этого для версий PHP ниже 7.0. Как лучше всего сделать это без PECL? У нас Ubuntu 14.x с PHP 5.6

ubuntu@box776:~$ pecl help version
PEAR Version: 1.10.1
PHP Version: 5.6.18
Zend Engine Version: 2.6.0
Running on: Linux box776.localdomain 3.13.0-86-generic #131-Ubuntu SMP Thu May 12 23:33:13 UTC 2016 x86_64

Обновление 1

$ sudo apt-get install php5-redis

Reading package lists... 0%
Reading package lists... 0%
Reading package lists... 0%
Reading package lists... 0%
Reading package lists... 0%
Reading package lists... 0%
Reading package lists... 41%
Reading package lists... Done


Building dependency tree... 50%
Building dependency tree       


Reading state information... Done

The following package was automatically installed and is no longer required:
  os-prober
Use 'apt-get autoremove' to remove it.
The following NEW packages will be installed:
  php5-redis
0 upgraded, 1 newly installed, 0 to remove and 59 not upgraded.
Need to get 105 kB of archives.
After this operation, 359 kB of additional disk space will be used.


0% [Working]Get:1 http://archive.ubuntu.com/ubuntu/ trusty/universe php5-redis amd64 2.2.4-1build2 [105 kB]

13% [1 php5-redis 14.2 kB/105 kB 13%]Fetched 105 kB in 0s (264 kB/s)
Selecting previously unselected package php5-redis.
(Reading database ... 
(Reading database ... 10%
(Reading database ... 25%
(Reading database ... 40%
(Reading database ... 303857 files and directories currently installed.)
Preparing to unpack .../php5-redis_2.2.4-1build2_amd64.deb ...
Unpacking php5-redis (2.2.4-1build2) ...
Setting up php5-redis (2.2.4-1build2) ...
php5_invoke: Enable module redis for apache2 SAPI
php5_invoke: Enable module redis for cli SAPI

Кажется, все идет гладко, но затем composer install говорит:

$ composer install --no-interaction

You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested PHP extension ext-redis * is missing from your system. Install or enable PHP's redis extension.


composer install --no-interaction returned exit code 2

Action failed: composer install

Обновление 2

Я SSH зашел в окно и выполнил ту же команду ...

ubuntu@box776:~$ apt-get install php5-redis
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
ubuntu@box776:~$ sudo apt-get install php5-redis
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  os-prober
Use 'apt-get autoremove' to remove it.
The following NEW packages will be installed:
  php5-redis
0 upgraded, 1 newly installed, 0 to remove and 59 not upgraded.
Need to get 105 kB of archives.
After this operation, 359 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ trusty/universe php5-redis amd64 2.2.4-1build2 [105 kB]
Fetched 105 kB in 0s (274 kB/s)
Selecting previously unselected package php5-redis.
(Reading database ... 303857 files and directories currently installed.)
Preparing to unpack .../php5-redis_2.2.4-1build2_amd64.deb ...
Unpacking php5-redis (2.2.4-1build2) ...
Setting up php5-redis (2.2.4-1build2) ...
php5_invoke: Enable module redis for apache2 SAPI
php5_invoke: Enable module redis for cli SAPI

Интересно, не хватает ли мне этих двух последних строк? Это говорит мне о том, что мне нужно предпринять дополнительные шаги для «включения модуля redis»?

1
задан 16 June 2016 в 22:04
1 ответ

ಸರ್ಕಲ್‌ಸಿಐ ಲೋಡ್‌ಗಳು ಮತ್ತು ಪಿಎಚ್ಪಿಯನ್ನು ತನ್ನದೇ ಆದ ಸ್ಥಳದಿಂದ ಕಾನ್ಫಿಗರ್ ಮಾಡುತ್ತದೆ: / ಆಪ್ಟ್ / ಸರ್ಕಲ್ಸಿ / ಪಿಎಚ್ಪಿ / {ಆವೃತ್ತಿ} . ಎಪಿಟಿ ಮೂಲಕ ಪಿಎಚ್ಪಿ-ರೆಡಿಸ್ ಅನ್ನು ಸ್ಥಾಪಿಸುವ ಮೂಲಕ ಮತ್ತು ನಂತರ ಎಪಿಟಿ-ಸ್ಥಾಪಿಸಿದ ಫೈಲ್‌ಗಳವರೆಗೆ ಸರ್ಕಲ್‌ಸಿಐನ ಪಿಎಚ್‌ಪಿ ಆವೃತ್ತಿಯನ್ನು ವೈರಿಂಗ್ ಮಾಡುವ ಮೂಲಕ ನಾವು ಪೋಸ್ಟ್ ಮಾಡಿದ ಸಮಸ್ಯೆಯನ್ನು ಪರಿಹರಿಸಿದ್ದೇವೆ. ಇದು ನಮ್ಮ ವೃತ್ತದಲ್ಲಿ ಕಾಣುತ್ತದೆ. ಆದ್ದರಿಂದ ಮೇಲಿನ ಬದಲಾವಣೆಯನ್ನು ನಿರ್ಲಕ್ಷಿಸುತ್ತದೆ. ಆದರೆ ನೀವು ಸಂಯೋಜಕ ಆಜ್ಞೆಯನ್ನು ನಿಮ್ಮದೇ ಆದೊಂದಿಗೆ ಅತಿಕ್ರಮಿಸಬಹುದು. ನಾವು ಇದನ್ನು circ.yml ಗೆ ಸೇರಿಸಿದ್ದೇವೆ:

dependencies:
  override:
    # CircleCI's new method of running composer breaks our php-redis setup below.
    - composer install --no-interaction
3
ответ дан 3 December 2019 в 18:34

Теги

Похожие вопросы