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

No releases available for package "pecl.php.net/redis",cant get the redis pecl #1661

Closed
LaJun opened this issue Jun 28, 2018 · 12 comments
Closed

Comments

@LaJun
Copy link

LaJun commented Jun 28, 2018

Info:

  • Docker version (18.03.1):
  • System info (deepin15.6 Linux):

Issue:

No releases available for package "pecl.php.net/redis"
run docker-compose up -d apache2 mysql redis mongo rabbitmq memcached elasticsearch jenkins kibana workspace

No releases available for package "pecl.php.net/redis"
install failed
ERROR: Service 'workspace' failed to build: The command '/bin/sh -c if [ ${INSTALL_PHPREDIS} = true ]; then     printf "\n" | pecl -q install -o -f redis &&     echo "extension=redis.so" >> /etc/php/${PHP_VERSION}/mods-available/redis.ini &&     phpenmod redis ;fi' returned a non-zero code: 1
@LaJun LaJun changed the title No releases available for package "pecl.php.net/redis" No releases available for package "pecl.php.net/redis",cant get the redis pecl Jun 28, 2018
@bestlong
Copy link
Member

Hi @LaJun
If you are in China
I guess it should be a network problem.

@LaJun
Copy link
Author

LaJun commented Jun 30, 2018

hi,@bestlong its should be network problem,i try install Again,successful,but when curl localhost,not found error,i set the param apppath “../wwwroot”then add a index.html file to this path,still this error,nginx configure wrong or other problems?but nginx configure never changed

@liyuze
Copy link

liyuze commented Aug 29, 2018

1.) download the extension from http://pecl.php.net/packages.php

2.) there you get an .tgz file

3.) install the file:

edit file: php-fpm/Dockerfile

RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
    # Install Php Redis Extension
    printf "\n" | pecl install -o -f redis \
    &&  rm -rf /tmp/pear \
    &&  docker-php-ext-enable redis \
;fi

replace to

RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
    # Install Php Redis Extension
    # printf "\n" | pecl install -o -f redis \
    printf "\n" | curl 'http://pecl.php.net/get/redis-4.1.1.tgz' -o redis-4.1.1.tgz \
    && pecl install redis-4.1.1.tgz \
    &&  rm -rf redis-4.1.1.tgz \
    &&  rm -rf /tmp/pear \
    &&  docker-php-ext-enable redis \
;fi

happy to rebuild

@Irving-yang
Copy link

1.) download the extension from http://pecl.php.net/packages.php

2.) there you get an .tgz file

3.) install the file:

edit file: php-fpm/Dockerfile

RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
    # Install Php Redis Extension
    printf "\n" | pecl install -o -f redis \
    &&  rm -rf /tmp/pear \
    &&  docker-php-ext-enable redis \
;fi

replace to

RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
    # Install Php Redis Extension
    # printf "\n" | pecl install -o -f redis \
    printf "\n" | curl 'http://pecl.php.net/get/redis-4.1.1.tgz' -o redis-4.1.1.tgz \
    && pecl install redis-4.1.1.tgz \
    &&  rm -rf redis-4.1.1.tgz \
    &&  rm -rf /tmp/pear \
    &&  docker-php-ext-enable redis \
;fi

happy to rebuild
have this error:
/bin/sh: 1: docker-php-ext-enable: not found

@rejidan
Copy link

rejidan commented Nov 20, 2018

try using vpn during installation, because in some cases the network can't access pecl.php.net

@musamamasood
Copy link

Faced the same issue due to network with proxy. Make sure that you should have internet access.

@stale
Copy link

stale bot commented Feb 7, 2020

Hi 👋 this issue has been automatically marked as stale 📌 because it has not had recent activity 😴. It will be closed if no further activity occurs. Thank you for your contributions ❤️.

@stale stale bot added the Stale label Feb 7, 2020
@stale
Copy link

stale bot commented Feb 28, 2020

Hi again 👋 we would like to inform you that this issue has been automatically closed 🔒 because it had not recent activity during the stale period. We really really appreciate your contributions, and looking forward for more in the future 🎈.

@stale stale bot closed this as completed Feb 28, 2020
@kerryj89
Copy link

kerryj89 commented May 27, 2021

I had to run the following commands: pear update-channels and pecl update-channels and after that I am able to move past the No releases available for package "pecl.php.net/redis" error 🤷 .

@dlgombert
Copy link

Just following up with what @kerryj89 said. It worked perfectly. I had to add the lines in my php-worker Dockerfile, and I also added them in my php-fpm Dockerfile, because I'm sure it won't hurt anything to have them wherever I'm potentially using pear or pecl.

@kilvn
Copy link
Contributor

kilvn commented Jul 25, 2023

it works.

printf "\n" | curl 'http://pecl.php.net/get/redis-4.3.0.tgz' -o redis-4.3.0.tgz \
      && pecl install redis-4.3.0.tgz \
      && rm -rf -- redis-4.3.0.tgz \
      && rm -rf /tmp/pear \
      && docker-php-ext-enable redis

@iartist93
Copy link

iartist93 commented Jul 31, 2023

@kerryj89 I'm confirming that this solution solved my issue too

# add these 2 lines before pecl install solved my download/connection issue
RUN pear update-channels
RUN pecl update-channels

RUN pecl install redis xdebug mongodb \
    && docker-php-ext-enable redis xdebug mongodb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants