在 CircleCI 上安装 AWS CLI 期间获取包时出错

问题描述 投票:0回答:1

我有一个使用 ruby 2.4.2 的旧项目,我正在尝试重新启动并运行。在致力于庞大的整体之前,我想在 CircleCI 中成功构建它。

我正在使用这张图片

docker:
 - image: circleci/ruby:2.4.2-node-browsers

并尝试构建

- run:
  name: Install AWS cli
  command: |
       sudo apt-get install python-dev python-pip
       sudo pip install awscli
       aws --version

此操作失败:

Err http://deb.debian.org/debian/ jessie/main python-support all 1.0.15
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main libdpkg-perl all 1.17.27
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main dpkg-dev all 1.17.27
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main build-essential amd64 11.7
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main libfakeroot amd64 1.20.2-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main fakeroot amd64 1.20.2-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main libalgorithm-diff-perl all 1.19.02-3
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main libalgorithm-diff-xs-perl amd64 0.04-3+b1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main libalgorithm-merge-perl all 0.08-2
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main libfile-fcntllock-perl amd64 0.22-1+b1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-ply all 3.4-5
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-pycparser all 2.10+dfsg-3
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-cffi amd64 0.8.6-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-pkg-resources all 5.5.1-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-chardet all 2.3.0-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-colorama all 0.3.2-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-cryptography amd64 0.6.1-1+deb8u1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-distlib all 0.1.9-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-html5lib all 0.999-3
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-openssl all 0.14-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-ndg-httpsclient all 0.3.2-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-urllib3 all 1.9.1-3
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-requests all 2.4.3-6
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-setuptools all 5.5.1-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-pip all 1.5.6-5
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-pyasn1 all 0.1.7-1
  404  Not Found
Err http://deb.debian.org/debian/ jessie/main python-wheel all 0.24.0-1
  404  Not Found
E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python-support/python-support_1.0.15_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/d/dpkg/libdpkg-perl_1.17.27_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/d/dpkg/dpkg-dev_1.17.27_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/b/build-essential/build-essential_11.7_amd64.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/f/fakeroot/libfakeroot_1.20.2-1_amd64.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/f/fakeroot/fakeroot_1.20.2-1_amd64.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/liba/libalgorithm-diff-perl/libalgorithm-diff-perl_1.19.02-3_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/liba/libalgorithm-diff-xs-perl/libalgorithm-diff-xs-perl_0.04-3+b1_amd64.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/liba/libalgorithm-merge-perl/libalgorithm-merge-perl_0.08-2_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/libf/libfile-fcntllock-perl/libfile-fcntllock-perl_0.22-1+b1_amd64.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/ply/python-ply_3.4-5_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/pycparser/python-pycparser_2.10+dfsg-3_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python-cffi/python-cffi_0.8.6-1_amd64.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python-setuptools/python-pkg-resources_5.5.1-1_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/c/chardet/python-chardet_2.3.0-1_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python-colorama/python-colorama_0.3.2-1_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python-cryptography/python-cryptography_0.6.1-1+deb8u1_amd64.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/d/distlib/python-distlib_0.1.9-1_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/h/html5lib/python-html5lib_0.999-3_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/pyopenssl/python-openssl_0.14-1_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/n/ndg-httpsclient/python-ndg-httpsclient_0.3.2-1_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python-urllib3/python-urllib3_1.9.1-3_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/r/requests/python-requests_2.4.3-6_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python-setuptools/python-setuptools_5.5.1-1_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/python-pip/python-pip_1.5.6-5_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/p/pyasn1/python-pyasn1_0.1.7-1_all.deb  404  Not Found

E: Failed to fetch http://deb.debian.org/debian/pool/main/w/wheel/python-wheel_0.24.0-1_all.deb  404  Not Found

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Exited with code exit status 100

我尝试添加

name: Update package index
    command: sudo apt-get update

致电之前

sudo apt-get install

但这也返回了 404 not found for the resources 我知道这些路径上不存在资源。但是,我不知道如何解决。

debian aws-cli circleci apt-get
1个回答
0
投票

首先,

jessie
是一个非常古老的Debian发行版,直到2020年才处于LTS状态。

因此,第一个建议是检查是否有可用的较新的 CircleCI 映像,或者至少基于较新的基础映像。

第二个选项是开始对

/etc/apt/sources.list
文件进行一些修改,您可以在其中指向 Debian 存档,然后尝试下载软件包。

- run:
  name: Install AWS cli
  command: |
    echo "deb [trusted=yes] http://archive.debian.org/debian/ jessie main contrib non-free" | sudo tee /etc/apt/sources.list                                  
    sudo apt update
    sudo apt-get install python-dev python-pip
    sudo pip install awscli
    # error here with python 2.7 that I was unable to fix
    aws --version

最后一个选项是使用 AWS-Cli Orb 并混合步骤,这样您仍然可以使用旧的 Ruby 和最新的 aws-cli。

© www.soinside.com 2019 - 2024. All rights reserved.