您好,本人centos7.0系统通过docker方式安装源码的时候报错,找到之前兄弟的方法仍不能解决

安装报错 · yjy123aw · 于 5年前 发布 · 4409 次阅读

xunsearch uses an image, skipping mongodb uses an image, skipping redis uses an image, skipping mysql uses an image, skipping Building php Step 1/11 : FROM php:7.1.13-fpm ---> 3ac64cb99e11 Step 2/11 : RUN apt-get update && apt-get install -y libfreetype6-dev librabbitmq-dev libssh-dev libjpeg62-turbo-dev libmcrypt-dev libpng12-dev libicu-dev libxml2-dev libssl-dev git wget ssh libpcre3-dev --no-install-recommends ---> [Warning] IPv4 forwarding is disabled. Networking will not work. ---> Running in a57ba947f95c Err http://deb.debian.org jessie InRelease

Err http://security.debian.org jessie/updates InRelease

Err http://deb.debian.org jessie-updates InRelease

Err http://security.debian.org jessie/updates Release.gpg Temporary failure resolving 'security.debian.org' Err http://deb.debian.org jessie Release.gpg Temporary failure resolving 'deb.debian.org' Err http://deb.debian.org jessie-updates Release.gpg Temporary failure resolving 'deb.debian.org' Reading package lists... W: Failed to fetch http://deb.debian.org/debian/dists/jessie/InRelease

W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/InRelease

W: Failed to fetch http://security.debian.org/dists/jessie/updates/InRelease

W: Failed to fetch http://deb.debian.org/debian/dists/jessie/Release.gpg Temporary failure resolving 'deb.debian.org'

W: Failed to fetch http://security.debian.org/dists/jessie/updates/Release.gpg Temporary failure resolving 'security.debian.org'

W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/Release.gpg Temporary failure resolving 'deb.debian.org'

W: Some index files failed to download. They have been ignored, or old ones used instead. Reading package lists... Building dependency tree... Reading state information...E: Unable to locate package libfreetype6-dev E: Unable to locate package librabbitmq-dev E: Unable to locate package libssh-dev E: Unable to locate package libjpeg62-turbo-dev E: Unable to locate package libmcrypt-dev E: Unable to locate package libpng12-dev E: Unable to locate package libicu-dev E: Unable to locate package libxml2-dev E: Unable to locate package libssl-dev E: Unable to locate package git E: Unable to locate package wget E: Unable to locate package ssh E: Package 'libpcre3-dev' has no installation candidate

Package libpcre3-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

ERROR: Service 'php' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y libfreetype6-dev librabbitmq-dev libssh-dev libjpeg62-turbo-dev libmcrypt-dev libpng12-dev libicu-dev libxml2-dev libssl-dev git wget ssh libpcre3-dev --no-install-recommends' returned a non-zero code: 100

共收到 7 条回复
yjy123aw#15年前 0 个赞

后来又出现这样的报错

xunsearch uses an image, skipping mongodb uses an image, skipping redis uses an image, skipping mysql uses an image, skipping Building php Step 1/11 : FROM php:7.1.13-fpm ---> 3ac64cb99e11 Step 2/11 : RUN apt-get update && apt-get install -y libfreetype6-dev librabbitmq-dev libssh-dev libjpeg62-turbo-dev libmcrypt-dev libpng12-dev libicu-dev libxml2-dev libssl-dev git wget ssh libpcre3-dev --no-install-recommends ---> Running in dc65088bab03 Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB] Ign http://deb.debian.org jessie InRelease Get:2 http://deb.debian.org jessie-updates InRelease [7340 B] Get:3 http://deb.debian.org jessie Release.gpg [2420 B] Get:4 http://deb.debian.org jessie Release [148 kB] Get:5 http://security.debian.org jessie/updates/main amd64 Packages [825 kB] Get:6 http://deb.debian.org jessie/main amd64 Packages [9098 kB] Fetched 10.1 MB in 15s (673 kB/s) W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/InRelease Unable to find expected entry 'main/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead. ERROR: Service 'php' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y libfreetype6-dev librabbitmq-dev libssh-dev libjpeg62-turbo-dev libmcrypt-dev libpng12-dev libicu-dev libxml2-dev libssl-dev git wget ssh libpcre3-dev --no-install-recommends' returned a non-zero code: 100 [root[@yjy123aw](/member/yjy123aw) yii2_fecshop_docker]# service network restart Restarting network (via systemctl): [ OK ] [root[@yjy123aw](/member/yjy123aw) yii2_fecshop_docker]# docker-compose build xunsearch uses an image, skipping mongodb uses an image, skipping redis uses an image, skipping mysql uses an image, skipping Building php Step 1/11 : FROM php:7.1.13-fpm ---> 3ac64cb99e11 Step 2/11 : RUN apt-get update && apt-get install -y libfreetype6-dev librabbitmq-dev libssh-dev libjpeg62-turbo-dev libmcrypt-dev libpng12-dev libicu-dev libxml2-dev libssl-dev git wget ssh libpcre3-dev --no-install-recommends ---> Running in 1945ef3ce96e Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB] Ign http://deb.debian.org jessie InRelease Get:2 http://deb.debian.org jessie-updates InRelease [7340 B] Get:3 http://deb.debian.org jessie Release.gpg [2420 B] Get:4 http://deb.debian.org jessie Release [148 kB] Get:5 http://security.debian.org jessie/updates/main amd64 Packages [825 kB] Get:6 http://deb.debian.org jessie/main amd64 Packages [9098 kB] Fetched 10.1 MB in 15s (662 kB/s) W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/InRelease Unable to find expected entry 'main/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead. ERROR: Service 'php' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y libfreetype6-dev librabbitmq-dev libssh-dev libjpeg62-turbo-dev libmcrypt-dev libpng12-dev libicu-dev libxml2-dev libssl-dev git wget ssh libpcre3-dev --no-install-recommends' returned a non-zero code: 100

Fecmall#25年前 0 个赞

网络问题,没法下载库包导致的报错:

Some index files failed to download. They have been ignored, or old ones used instead. ERROR: Service 'php' failed to build

请使用阿里云的yml文件,在安装的部分有介绍:https://github.com/fecshop/yii2_fecshop_docker

如果您在构建的过程中,出现因为网速问题,导致的安装失败,可以将 docker-compose.yml.aliyun 内容覆盖 docker-compose.yml ,全部使用阿里云 的镜像(镜像是由fecshop上传的)。

全部使用阿里云的镜像就好了。

yjy123aw#35年前 0 个赞

这个方法我试过了,还是不行,我的服务器是在美国的

Fecmall#45年前 0 个赞

@yjy123aw #3楼 美国的服务器,用这个试试:docker-compose.yml.php.hub,将这个文件覆盖 docker-compose.yml

yjy123aw#55年前 0 个赞

好的

yjy123aw#65年前 0 个赞

xunsearch uses an image, skipping mongodb uses an image, skipping redis uses an image, skipping mysql uses an image, skipping php uses an image, skipping web uses an image, skipping

替代完以后直接成这样了

Fecmall#75年前 0 个赞

1.应该是不影响的

2.这个代表:docker容器已经创建了,因此skip

如果你想要重新build容器,可以删除掉这些已经创建的容器

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics