我的Bitbucket Pipeline配置了一段时间,但今天我的构建开始因为apt-get
命令而失败:
我使用的是java 8 docker镜像:
image: java:8
并且我需要安装python
# Install python
- echo "Install python"
- apt-get update
- apt-get install python-pip -q -y
使用"apt-get“命令构建开始失败:
+ apt-get update
Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]
Ign http://deb.debian.org jessie InRelease
Ign http://deb.debian.org jessie-updates InRelease
Ign http://deb.debian.org jessie-backports InRelease
Get:2 http://deb.debian.org jessie Release.gpg [2420 B]
Ign http://deb.debian.org jessie-updates Release.gpg
Ign http://deb.debian.org jessie-backports Release.gpg
Get:3 http://deb.debian.org jessie Release [148 kB]
Ign http://deb.debian.org jessie-updates Release
Ign http://deb.debian.org jessie-backports Release
Err http://deb.debian.org jessie-backports/main amd64 Packages
Get:4 http://security.debian.org jessie/updates/main amd64 Packages [822 kB]
Get:5 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
Err http://deb.debian.org jessie-updates/main amd64 Packages
404 Not Found
Err http://deb.debian.org jessie-backports/main amd64 Packages
404 Not Found
Fetched 10.1 MB in 7s (1395 kB/s)
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-backports/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
Skipping cache upload for failed step
Searching for test report files in directories named [test-results, failsafe-reports, test-reports, surefire-reports] down to a depth of 4
Finished scanning for test reports. Found 0 test report files.
Merged test suites, total number tests is 0, with 0 failures and 0 errors.
有什么改变了吗?是否需要调整我的配置?
发布于 2019-03-27 18:00:50
与参考的其他答案一样,Jessie and Wheezy repositories have been removed from their normal locations。当尝试在某些Docker镜像上运行apt-get update
时,这将导致404错误。
除非你对Docker镜像有特别的需求,否则我建议你把它改成使用Debian Stretch repositories的镜像。
在您的例子中,对于java:8
镜像,这是支持openjdk image的deprecated。我测试了openjdk:8
,发现它使用了Stretch,并且可以很好地运行apt-get update
。
我还编写了一个具有类似细节的official post on Atlassian Community。如果我们发现任何其他可能与解决此问题相关的问题,我们将更新本文。
发布于 2019-03-27 05:05:05
杰西和惠兹由于年龄原因被从正常的回购地点移走。
有关解决方案,请参阅以下问题:https://unix.stackexchange.com/questions/508724/failed-to-fetch-jessie-backports-repository
发布于 2019-03-27 09:14:58
我也遇到了这个问题(因为它在Pipeline的机器上,甚至不是我自己的机器)。
我在apt-get update之前运行了这个:sed -i '/jessie-updates/d' /etc/apt/sources.list
我的pipelines.yml的这一部分如下所示:
- sed -i '/jessie-updates/d' /etc/apt/sources.list # Debian mirror-network drops Jessie, so don't use it
- apt-get update # required to install zip
- apt-get install -y zip # required for packaging up the application
Full answer here (引用另一个)
https://stackoverflow.com/questions/55364597
复制相似问题