我正在尝试使用我的 Ubuntu 机器为我的 Raspberry Pi 创建一个工具链。我已经安装了 crosstool-ng 1.24.0。当我运行时./ct-ng build
,它说它无法下载 expat。这是输出:
[INFO ] Performing some trivial sanity checks
[WARN ] Number of open files 1024 may not be sufficient to build the toolchain; increasing to 2048
[INFO ] Build started 20210903.144609
[INFO ] Building environment variables
[WARN ] Directory '/home/daniel/src' does not exist.
[WARN ] Will not save downloaded tarballs to local storage.
[EXTRA] Preparing working directories
[EXTRA] Installing user-supplied crosstool-NG configuration
[EXTRA] =================================================================
[EXTRA] Dumping internal crosstool-NG configuration
[EXTRA] Building a toolchain for:
[EXTRA] build = x86_64-pc-linux-gnu
[EXTRA] host = x86_64-pc-linux-gnu
[EXTRA] target = aarch64-rpi3-linux-gnu
[EXTRA] Dumping internal crosstool-NG configuration: done in 0.18s (at 00:03)
[INFO ] =================================================================
[INFO ] Retrieving needed toolchain components' tarballs
[EXTRA] Retrieving 'linux-4.20.8'
[EXTRA] Verifying SHA512 checksum for 'linux-4.20.8.tar.xz'
[EXTRA] Retrieving 'zlib-1.2.11'
[EXTRA] Verifying SHA512 checksum for 'zlib-1.2.11.tar.xz'
[EXTRA] Retrieving 'gmp-6.1.2'
[EXTRA] Verifying SHA512 checksum for 'gmp-6.1.2.tar.xz'
[EXTRA] Retrieving 'mpfr-4.0.2'
[EXTRA] Verifying SHA512 checksum for 'mpfr-4.0.2.tar.xz'
[EXTRA] Retrieving 'isl-0.20'
[EXTRA] Verifying SHA512 checksum for 'isl-0.20.tar.xz'
[WARN ] Downloaded file isl-0.20.tar.xz reference digest not available
[EXTRA] Retrieving 'mpc-1.1.0'
[EXTRA] Verifying SHA512 checksum for 'mpc-1.1.0.tar.gz'
[EXTRA] Retrieving 'expat-2.2.6'
[ERROR] expat: download failed
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Retrieving needed toolchain components' tarballs'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_Abort[scripts/functions@487]
[ERROR] >> called from: CT_DoFetch[scripts/functions@2103]
[ERROR] >> called from: CT_PackageRun[scripts/functions@2063]
[ERROR] >> called from: CT_Fetch[scripts/functions@2174]
[ERROR] >> called from: do_expat_get[scripts/build/companion_libs/210-expat.sh@12]
[ERROR] >> called from: do_companion_libs_get[scripts/build/companion_libs.sh@15]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@648]
[ERROR] >>
[ERROR] >> For more info on this error, look at the file: 'build.log'
[ERROR] >> There is a list of known issues, some with workarounds, in:
[ERROR] >> https://crosstool-ng.github.io/docs/known-issues/
[ERROR] >>
[ERROR] >> If you feel this is a bug in crosstool-NG, report it at:
[ERROR] >> https://github.com/crosstool-ng/crosstool-ng/issues/
[ERROR] >>
[ERROR] >> Make sure your report includes all the information pertinent to this issue.
[ERROR] >> Read the bug reporting guidelines here:
[ERROR] >> http://crosstool-ng.github.io/support/
[ERROR]
[ERROR] (elapsed: 1:09.34)
[01:10] / make: *** [ct-ng:261: build] Error 1
.build/tarballs
正如我所看到的其他人推荐的那样,我已经尝试手动将 expat 2.2.6 的 tar 球放入。但是,错误不会改变。