当前位置:  开发笔记 > 编程语言 > 正文

crosstool-ng无法获取linux tarball

如何解决《crosstool-ng无法获取linuxtarball》经验,为你挑选了0个好方法。

我正在尝试使用构建工具链crosstool-ng,我已经将其全部设置好,并按照http://crosstool-ng.org/#download_and_usage所述选择了我的CPU ,现在可以构建工具链了。ct-ng build但是,当我输入时,它会由于以下错误而取消:

$ ct-ng build
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20170126.135517
[INFO ]  Building environment variables
[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 = powerpc-e500v2-linux-gnuspe
[EXTRA]  Dumping internal crosstool-NG configuration: done in 0.09s (at 00:02)
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[EXTRA]    Retrieving 'linux-4.3'
[ERROR]
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Retrieving needed toolchain components' tarballs'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: do_kernel_get[scripts/build/kernel/linux.sh@741]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@590]
[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]  >>      '/usr/local/share/doc/crosstool-ng/crosstool-ng-1.22.0/B - Known issues.txt'
[ERROR]
[ERROR]  (elapsed: 0:31.10)
[00:31] / make: *** [build] Error 1

build.log我得到以下内容:

[EXTRA]    Retrieving 'linux-4.3'
...
...
...
[DEBUG]    Not at this location: "http://www.kernel.org/pub/linux/kernel/v4.x/longterm/v4.3/linux-4.3.zip"
[DEBUG]    Trying 'http://www.kernel.org/pub/linux/kernel/v4.x/longterm/linux-4.3.zip'
[DEBUG]    ==> Executing: 'wget' '--passive-ftp' '--tries=3' '-nc' '--...
[DEBUG]    Not at this location: "http://www.kernel.org/pub/linux/kernel/v4.x/longterm/linux-4.3"
[ERROR]
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Retrieving needed toolchain components' tarballs'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: do_kernel_get[scripts/build/kernel/linux.sh@741]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@590]
[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]  >>      '/usr/local/share/doc/crosstool-ng/crosstool-ng-1.22.0/B - Known issues.txt'
[ERROR]
[ERROR]  (elapsed: 0:31.10)

我知道它无法检索内核,有没有办法我可以手动下载它并告诉脚本tarball的位置?

好的,我意识到这 wget http://www.kernel.org/pub/linux/kernel/v4.x/linux-4.3.tar.gz将失败,但是wget --no-check-certificate http://www.kernel.org/pub/linux/kernel/v4.x/linux-4.3.tar.gz可以通过代理正常下载tarball。所以我复制/usr/bin/wget到/ usr / binwget〜orig and wrote a wrapper/ usr / bin / wget`如下:

#!/bin/bash

/usr/bin/wget~orig --no-check-certificate $1

但这似乎也不起作用,我现在得到以下内容build.log

[DEBUG]    ==> Executing: 'wget' '--passive-ftp' '--tries=3' '-nc' '--progress=dot:binary' '-T' '10' '-O' '/home/ron/src/toolchain/work/.build/tarballs/linux-4.3.tar.xz.tmp-dl' 'http://www.kernel.org/pub/linux/kernel/v4.x/linux-4.3.tar.xz'
[ALL  ]    wget~orig: missing URL
[ALL  ]    Usage: wget~orig [OPTION]... [URL]...
[ALL  ]
[ALL  ]    Try `wget~orig --help' for more options.
[DEBUG]    Not at this location: "http://www.kernel.org/pub/linux/kernel/v4.x/linux-4.3.tar.xz"
[DEBUG]    Trying 'http://www.kernel.org/pub/linux/kernel/v4.x/longterm/v4.3/linux-4.3.tar.xz'
[DEBUG]    ==> Executing: 'wget' '--passive-ftp' '--tries=3' '-nc' '--progress=dot:binary' '-T' '10' '-O' '/home/ron/src/toolchain/work/.build/tarballs/linux-4.3.tar.xz.tmp-dl' 'http://www.kernel.org/pub/linux/kernel/v4.x/longterm/v4.3/linux-4.3.tar.xz'
[ALL  ]    wget~orig: missing URL
[ALL  ]    Usage: wget~orig [OPTION]... [URL]...

它如何自动知道我的原始wget二进制文件现在称为wget~orig???Andit尝试使用它而不是我现在位于的包装器/usr/bin/wget(是的,我已经添加了x权限并尝试了它,wget http://www.kernel.org/pub/linux/kernel/v4.x/linux-4.3.tar.gz从shell(利用我的包装器脚本)的工作现在很好...

推荐阅读
可爱的天使keven_464
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有