初入OpenWrt,尝试使用opkg update 提示
root@OpenWrt:~# opkg install luci-compat
Unknown package ‘luci-compat’.
Collected errors:
* opkg_install_cmd: Cannot install package luci-compat.
root@OpenWrt:~# opkg update
Downloading https://downloads.openwrt.org/releases/24.10.5/targets/x86/generic/packages/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/24.10.5/targets/x86/generic/packages/Packages.gzDownloading https://downloads.openwrt.org/releases/24.10.5/packages/i386_pentium4/base/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/24.10.5/packages/i386_pentium4/base/Packages.gzDownloading https://downloads.openwrt.org/releases/24.10.5/targets/x86/generic/kmods/6.6.119-1-94a7ed88e7ec3bf1233d84ad19660709/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/24.10.5/targets/x86/generic/kmods/6.6.119-1-94a7ed88e7ec3bf1233d84ad19660709/Packages.gzDownloading https://downloads.openwrt.org/releases/24.10.5/packages/i386_pentium4/luci/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/24.10.5/packages/i386_pentium4/luci/Packages.gzDownloading https://downloads.openwrt.org/releases/24.10.5/packages/i386_pentium4/packages/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/24.10.5/packages/i386_pentium4/packages/Packages.gzDownloading https://downloads.openwrt.org/releases/24.10.5/packages/i386_pentium4/routing/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/24.10.5/packages/i386_pentium4/routing/Packages.gzDownloading https://downloads.openwrt.org/releases/24.10.5/packages/i386_pentium4/telephony/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/24.10.5/packages/i386_pentium4/telephony/Packages.gzCollected errors:
* opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.5/targets/x86/generic/packages/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.* opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.5/packages/i386_pentium4/base/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.* opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.5/targets/x86/generic/kmods/6.6.119-1-94a7ed88e7ec3bf1233d84ad19660709/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.* opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.5/packages/i386_pentium4/luci/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.* opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.5/packages/i386_pentium4/packages/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.* opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.5/packages/i386_pentium4/routing/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.* opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.5/packages/i386_pentium4/telephony/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.
因为是新配置的机器,还没配置网络,可能是网络无法连接或 DNS 没配置导致。
解决方案:
1、尝试设置网络和DNS
interface -> Edit(Lan) -> IPv4 gateway 或 Advanced Settings 里的Use custom DNS servers
2、查看解析
nslookup downloads.openwrt.org
3、再执行一次
opkg update
成功即可。
