Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use homebrew to install phpredis. #1341

Closed
rquadling opened this issue Apr 23, 2018 · 5 comments

Comments

@rquadling
Copy link

commented Apr 23, 2018

Homebrew-php is deprecated/deleted/dead as a dodo.
Homebrew-core is now the thing.
brew install php70-redis (or any version) is no longer present.

Whilst it isn't directly phpredis's issue what some third party package manager has done, I'm hoping someone here knows the right magic to install this extension, ideally via homebrew (but not necessary if an easier option is available).

@yatsukhnenko

This comment has been minimized.

Copy link
Member

commented May 23, 2018

You can always install extension via pecl
pecl install redis
or compile it from scratch :)

@rquadling

This comment has been minimized.

Copy link
Author

commented May 23, 2018

I realised that once I realised phpredis and pecl/redis are the same. Any reason why the names aren't consistent?

@rquadling rquadling closed this May 23, 2018

@javorszky

This comment has been minimized.

Copy link

commented Jul 5, 2018

pecl install redis results in this:

Build process completed successfully
Installing '/usr/local/Cellar/php/7.2.7/pecl/20170718/redis.so'

Warning: mkdir(): File exists in System.php on line 294

Warning: mkdir(): File exists in /usr/local/Cellar/php/7.2.7/share/php/pear/System.php on line 294
ERROR: failed to mkdir /usr/local/Cellar/php/7.2.7/pecl/20170718

Solution

Because /usr/local/Cellar/php/7.2.7/pecl is not a directory. It's a symlink to /usr/local/lib/php/pecl

The solution to that is that the pecl that's being used is in /usr/local/Cellar/php/7.2.7/bin/pecl, and not the 7.2.7/pecl file, so that symlink can be removed, and a directory created.

For those who bump into this problem.

Double check which pecl and what that file is pointing to, etc.

@danielbachhuber

This comment has been minimized.

Copy link

commented Sep 20, 2018

One issue I ran into is that pecl install redisdumpedextension="redis.so"at the top of myphp.ini`. This was invalid, and gave me an error like this:

Warning: PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/local/lib/php/pecl/20170718/redis.so (dlopen(/usr/local/lib/php/pecl/20170718/redis.so, 9): image not found), /usr/local/lib/php/pecl/20170718/redis.so.so (dlopen(/usr/local/lib/php/pecl/20170718/redis.so.so, 9): image not found)) in Unknown on line 0

I removed the extension="redis.so" line and instead created /usr/local/etc/php/7.2/conf.d/ext-redis.ini with:

extension="/usr/local/Cellar/php/7.2.9_2/pecl/20170718/redis.so"
@blind3dd

This comment has been minimized.

Copy link

commented Jan 28, 2019

for me it went like this:
$ wget https://github.com/nicolasff/phpredis/archive/master.zip
(unzip)
$ cd <unzipped_dir>
$ phpize ;./configure ;make ; sudo make install

$ find your php; for me it was /usr/local/etc/php/7.1/conf.d/
$ navigate there and:
cat >> ext-redis.ini << 'AyeCaramba'
extension="/usr/local/Cellar/php@7.1/7.1.25/pecl/20160303/redis.so"
AyeCaramba
$ brew services restart php@7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.