0

我正在尝试使用以下命令在 openwrt 上安装 gcc:

opkg install gcc

但它给了我以下错误:

/bin/ash: gcc: not found
root@OpenWrt:/mp1# opkg install gcc
Unknown package 'gcc'.
Collected errors:
 * opkg_install_cmd: Cannot install package gcc.

我尝试使用更新 opkg opkg update,但得到以下信息:

Downloading http://downloads.openwrt.org/chaos_calmer/15.05/x86/generic/packages
wget: bad address 'downloads.openwrt.org'
Downloading http://downloads.openwrt.org/chaos_calmer/15.05/x86/generic/packages
wget: bad address 'downloads.openwrt.org'
Signature check failed.
Remove wrong Signature file.
Downloading http://downloads.openwrt.org/chaos_calmer/15.05/x86/generic/packages
wget: bad address 'downloads.openwrt.org'
Downloading http://downloads.openwrt.org/chaos_calmer/15.05/x86/generic/packages
wget: bad address 'downloads.openwrt.org'
Signature check failed.
Remove wrong Signature file.
Downloading http://downloads.openwrt.org/chaos_calmer/15.05/x86/generic/packages
wget: bad address 'downloads.openwrt.org'
Downloading http://downloads.openwrt.org/chaos_calmer/15.05/x86/generic/packages
wget: bad address 'downloads.openwrt.org'
Signature check failed.
Remove wrong Signature file.
Downloading http://downloads.openwrt.org/chaos_calmer/15.05/x86/generic/packagez
wget: bad address 'downloads.openwrt.org'
Downloading http://downloads.openwrt.org/chaos_calmer/15.05/x86/generic/packageo
wget: bad address 'downloads.openwrt.org'
Signature check failed.
Remove wrong Signature file.
Downloading http://downloads.openwrt.org/chaos_calmer/15.05/x86/generic/packages
wget: bad address 'downloads.openwrt.org'
Downloading http://downloads.openwrt.org/chaos_calmer/15.05/x86/generic/packaget
wget: bad address 'downloads.openwrt.org'
Signature check failed.
Remove wrong Signature file.
Downloading http://downloads.openwrt.org/chaos_calmer/15.05/x86/generic/packages
wget: bad address 'downloads.openwrt.org'
Downloading http://downloads.openwrt.org/chaos_calmer/15.05/x86/generic/packages
wget: bad address 'downloads.openwrt.org'
Signature check failed.
Remove wrong Signature file.
Collected errors:
 * opkg_download: Failed to download http://downloads.openwrt.org/chaos_calmer/b
 * opkg_download: Failed to download http://downloads.openwrt.org/chaos_calmer/1
 * opkg_download: Failed to download http://downloads.openwrt.org/chaos_calmer/1
 * opkg_download: Failed to download http://downloads.openwrt.org/chaos_calmer/0
 * opkg_download: Failed to download http://downloads.openwrt.org/chaos_calmer/ 
 * opkg_download: Failed to download http://downloads.openwrt.org/chaos_calmer/1
 * opkg_download: Failed to download http://downloads.openwrt.org/chaos_calmer/1
 * opkg_download: Failed to download http://downloads.openwrt.org/chaos_calmer/c
 * opkg_download: Failed to download http://downloads.openwrt.org/chaos_calmer/u
 * opkg_download: Failed to download http://downloads.openwrt.org/chaos_calmer/1
 * opkg_download: Failed to download http://downloads.openwrt.org/chaos_calmer/1
 * opkg_download: Failed to download http://downloads.openwrt.org/chaos_calmer/1

我该如何解决?

4

1 回答 1

0

我相当确定您没有互联网连接,或者您的 DNS 不知何故搞砸了,并且没有将“downloads.openwrt.org”解析为 IP 地址。

您可以尝试ping 8.8.8.8查看您是否有可用的互联网连接。然后尝试ping google.com(或host downloads.openwrt.org)查看您的 DNS 是否正常工作。

或者,我相当确定您可以自己使用 GCC 构建 OpenWRT 映像。这是一个关于如何做到这一点的好教程:https ://openwrt.org/docs/guide-developer/quickstart-build-images

于 2020-02-04T13:55:25.747 回答