-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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"解决 #10
Comments
这个错误主要是因为国网络访问外网受限所致。
注意,其中的IP要换成可用的proxy IP。 |
如果没有代理的话,可以从pecl.php.net下载源码包,然后参考/php/php54/Dockerfile文件的最后7行,通过源码包方式安装。 |
我是在自己的mac上安装的,RUN pear config-set http_proxy http://192.168.2.81(主机IP),mac上是开了代理服务器的,我是哪里配置错了吗 |
可以ping通主机的IP吗?如果ping不通,用docker虚拟出来的IP,比如示例中的:10.0.75.1 |
关于有墙的问题.其实更简单的方法是利用好dockerhub的自动构建功能,相当于做了下中转. |
老板,您故意的吧。我直接把您这句“RUN pear config-set http_proxy http://10.0.75.1:1080” 给删了。就可以了。。。害得我好辛苦。。。 |
感谢楼上的评论,拯救了我! |
@liuqingliu 我删了 也可以用了 |
@larlence100 可以告诉我是在哪个文件里面有这个吗,具体的路径,为啥我都找不到这个 |
@liuqingliu 知道了,被博主删除了,再拉一次master分支就行了 |
@liuqingliu @larlence100 @cymsummer 加了php72后没删掉,抱歉~已经修正 |
@yeszao 谢谢大佬。很厉害! |
楼主的这个安装了好久,跟大家出现一样的错误,但是又很不想使用楼主说的7行代码那么长的源码安装方式。也没有代理。所以改成了如下方式,成功了。记录一下分享给大家。 RUN sudo apt-get install php-dev php-pear autoconf automake libtool -y COPY ./redis-3.1.5.tgz /var/www/html/ RUN pecl install redis-3.1.5.tgz 这里有两种方式 一种是redis的先在容器外面的下载安装包,然后拷贝到容器中。这个方法比较麻烦。另一种就是像xdebug这种的,在容器中直接下载,然后安装。两种都可以,供大家参考 |
使用楼上那位兄弟@MRchenao 的说法 完整代码整理 如下
|
@ADirtyCat why docker-php-ext-enable not found |
@haydenzhourepo
|
@MRchenao @ADirtyCat 总结得很好 唯一担心的就是,我的网络经常 pecl.php.net 都得用梯子,无语啊~~我猜不少人也是一样的情况。 |
加上代理好使了,建议楼主以后发dockerfile 尽量把自己的配置信息去掉。没有坑到我 ,我都是用官方的 |
@wonbin2011 早已经没有咯~ |
pecl -vvv install redis-3.1.4
`Warning: file_exists(): Unable to find the wrapper "channel" - did you forget to enable it when you configured PHP? in PEAR/Downloader/Package.php on line 1511
Warning: is_file(): Unable to find the wrapper "channel" - did you forget to enable it when you configured PHP? in PEAR/Downloader/Package.php on line 1521
Warning: is_file(): Unable to find the wrapper "channel" - did you forget to enable it when you configured PHP? in PEAR/Downloader/Package.php on line 1521
Warning: fsockopen(): Failed to enable crypto in PEAR/Proxy.php on line 179
Warning: fsockopen(): unable to connect to ssl://pecl.php.net:443 (Unknown error) in PEAR/Proxy.php on line 179
No releases available for package "pecl.php.net/redis"
Cannot initialize 'channel://pecl.php.net/redis-3.1.4', invalid or missing package file
Package "channel://pecl.php.net/redis-3.1.4" is not valid
install failed`
The text was updated successfully, but these errors were encountered: