LoginSignup

Why not login to Qiita and try out its useful features?

We'll deliver articles that match you.

You can read useful information later.

1
0

opkg update ができない問題と解決法

Posted at

現在の環境

現在の環境としては以下の図のようになっています。

      +------------------------+
      |        Router          |
      |   IP: 192.168.11.1     |
      +------------------------+
                 |
                 |
                 |
      +------------------------+
      |       L2 Switch        |
      +------------------------+
                 |
                 |
                 |
      +------------------------+
      |   Access Point (AP)    |
      |   IP: 192.168.11.100   |
      +------------------------+

chatGPTに書かせてみました、、、、

opkg updateをした際のエラー画面

opkg update
Downloading https://downloads.openwrt.org/releases/22.03.5/targets/ath79/generic/packages/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.5/targets/ath79/generic/packages/Packages.gz

Downloading https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/base/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/base/Packages.gz

Downloading https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/luci/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/luci/Packages.gz

Downloading https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/packages/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/packages/Packages.gz

Downloading https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/routing/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/routing/Packages.gz

Downloading https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/telephony/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/telephony/Packages.gz

Collected errors:
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.5/targets/ath79/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/22.03.5/packages/mips_24kc/base/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/luci/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/routing/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/telephony/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

このようにネットワークの設定を確認してほしいとのこと。

確認したところ、ルータにpingは通ったのですがgoogle.comには通らなかったです。

routeを確認する。

route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.11.0    *               255.255.255.0   U     0      0        0 br-lan

/etc/resolv.confを少し触ったのでこのような状態になっています。

解決方法

デフォルトゲートウェイが設定されていないので追加します。

# route add default gw 192.168.11.1 

# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.11.1    0.0.0.0         UG    0      0        0 br-lan
192.168.11.0    *               255.255.255.0   U     0      0        0 br-lan

opkg update成功

 opkg update
Downloading https://downloads.openwrt.org/releases/22.03.5/targets/ath79/generic/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading https://downloads.openwrt.org/releases/22.03.5/targets/ath79/generic/packages/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/base/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/luci/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/packages/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/routing/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Downloading https://downloads.openwrt.org/releases/22.03.5/packages/mips_24kc/telephony/Packages.sig
Signature check passed.

最後に

いろいろ調べたのですが、openwrtに関する記事が少なかったのと、比較的基礎的な部分(openwrt関係なかった)の失敗だったので備忘録として残したいと思います。

ネットワークの知識は皆無なので間違ている個所があればご指摘のほどよろしくお願いいたします。

1
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
LaP1s

@LaP1s(lapis)

ボットネットやIoTデバイスに関する研究をしている大学生です。

Comments

Bacalhau
@Bacalhau(Bacalhau)

@LaP1s さん

かなり特殊な例ですが、私の場合、wan6が有効になっている時にopkg updateができなかったことがあります。
それ以外の問題は発生していなかったため、Network > Interfacewan6を止めて対応しました。

また、OpenWrtルーターの時刻がずれている場合は、ほぼ確実にopkg updateが失敗します。

どなたかの役に立つかもしれないので、備忘録として書き込みます。

1

Let's comment your feelings that are more than good

Being held Article posting campaign

しくじりエンジニア!私みたいになるな!

~
View details

これからの情報伝達手段の在り方について考えてみよう!

~
View details
1
0

Login to continue?

Login or Sign up with social account

Login or Sign up with your email address