The opkg install command failed with code 255

1-when i try to update package list or install any package i get this message
" Unable to execute opkg update command: SyntaxError: Unexpected end of JSON input"


2-after refreshing the luci software and trying to install any package i get this message:
Screenshot 2024-09-12 150944

openwrt ver:

The error says that you need to check your network settings and connectivity.

How is this device connected to the network/internet?

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall
2 Likes

It is not recommended to upgrade packages one by one unless it solves any particular problem.

Installing packages is okay, of course. Upgrading packages, as stated by @brada4, is not recommended. Only upgrade packages if there is a specific reason to do so. But it looks like you were just looking to install packages.

iam a new user. Just upgraded to openwrt. Want to install the first packages( i need openvpn & wireguard).
Connected by lan on modem and wan on router. (because of the probable internet connection problem caused this decided to) download packages and upload and install them. after multiple tries, some appeared in installed section
Screenshot 2024-09-13 luci_wireguard
Screenshot 2024-09-13 wireguard

but not the "openvpn-openssl_2.4.5-4.2_mipsel_24kc.ipk".
it shows this message:
Screenshot 2024-09-13 ssl_UploadError
The Link that used to download "mipsel_24kc" architecture packages

Thank you for response.
there is what you want:

root@OpenWrt:~# root@OpenWrt:~# ubus call system board
        "model": "D-Link DIR-853 A3",
-ash: root@OpenWrt:~#: not found
        "board_name": "dlink,dir-853-a3",
root@OpenWrt:~# {
        "rootfs_type": "squashfs",
>         "kernel": "5.15.162",
                "revision": "r24012-d8dd03c46f",
>         "hostname": "OpenWrt",
>         "system": "MediaTek MT7621 ver:1 eco:3",
>         "model": "D-Link DIR-853 A3",
>         "board_name": "dlink,dir-853-a3",

>         "rootfs_type": "squashfs",
        option name 'br-lan'
>         "release": {
        option type 'bridge'
>                 "distribution": "OpenWrt",
        list ports 'lan2'
>                 "version": "23.05.4",
        list ports 'lan4'
>                 "revision": "r24012-d8dd03c46f",
>                 "target": "ramips/mt7621",
        option proto 'static'
>                 "description": "OpenWrt 23.05.4 r24012-d8dd03c46f"
config interface 'wan'
>         }
        option device 'wan'
-ash: kernel:: not found
-ash: hostname:: not found
-ash: system:: not found
        option proto 'dhcp'
-ash: model:: not found
-ash: board_name:: not found
-ash: rootfs_type:: not found

-ash: release:: not found
-ash: distribution:: not found
-ash: version:: not found
config interface 'wan6'
-ash: revision:: not found
-ash: target:: not found
-ash: description:: not found
        option device 'wan'
root@OpenWrt:~# }
-ash: syntax error: unexpected "}"
root@OpenWrt:~# root@OpenWrt:~# cat /etc/config/network
-ash: root@OpenWrt:~#: not found
root@OpenWrt:~#
root@OpenWrt:~# config interface 'loopback'
-ash: config: not found
root@OpenWrt:~#         option device 'lo'
-ash: option: not found
        option cell_density '0'
root@OpenWrt:~#         option proto 'static'
        option device 'radio0'
-ash: option: not found
root@OpenWrt:~#         option ipaddr '127.0.0.1'
        option encryption 'none'
-ash: option: not found
root@OpenWrt:~#         option netmask '255.0.0.0'
        option type 'mac80211'
-ash: option: not found
root@OpenWrt:~#
root@OpenWrt:~# config globals 'globals'
-ash:  config: not found
       option htmode 'VHT80'
        option disabled '1'
root@OpenWrt:~#         option ula_prefix 'fd8a:4a8c:c613::/48'
-ash: option: not found
        option mode 'ap'
root@OpenWrt:~#         option packet_steering '1'
-ash: root@option: not found
OpenWrt:~# cat /etc/config/dhcp
root@OpenWrt:~#
root@OpenWrt:~# config device
-ash: config: not found
root@OpenWrt:~#         option name 'br-lan'
-ash: option: not found
root@OpenWrt:~#         option type 'bridge'
-ash: option: not found
root@OpenWrt:~#         list ports 'lan1'
-ash: list: not found
        option authoritative '1'
root@OpenWrt:~#         list ports 'lan2'
-ash: list: not found
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
root@OpenWrt:~#         list ports 'lan3'
        option ednspacket_max '1232'
-ash: list: not found
root@OpenWrt:~#         list ports 'lan4'
-ash: list: not found
root@OpenWrt:~#
root@OpenWrt:~# config interface 'lan'
-ash: config: not found
root@OpenWrt:~#         option device 'br-lan'
-ash: option: not found
        option ra 'server'
root@OpenWrt:~#         option proto 'static'
        list ra_flags 'other-config'
-ash: option: not found
root@OpenWrt:~#         option ipaddr '192.168.1.1'
-ash: option: not found
root@OpenWrt:~#         option netmask '255.255.255.0'
        option leasetrigger '/usr/sbin/odhcpd-update'
-ash: option: not found
root@OpenWrt:~#         option ip6assign '60'
-ash: option: not found
root@OpenWrt:~#
root@OpenWrt:~# config interface 'wan'
-ash: config: not found
root@OpenWrt:~#         option device 'wan'
-ash: option: not found
root@OpenWrt:~#         option proto 'dhcp'
-ash: option: not found
root@OpenWrt:~#
root@OpenWrt:~# config interface 'wan6'
-ash: config: not found
root@OpenWrt:~#         option device 'wan'
-ash: option: not found
root@OpenWrt:~#         option proto 'dhcpv6'
-ash: option: not found
root@OpenWrt:~#
root@OpenWrt:~# config interface 'wwan'
-ash: config: not found
root@OpenWrt:~#         option proto 'dhcp'
-ash: option: not found
root@OpenWrt:~#
root@OpenWrt:~# root@OpenWrt:~# cat /etc/config/wireless
-ash: root@OpenWrt:~#: not found
root@OpenWrt:~#
root@OpenWrt:~# config wifi-device 'radio0'
-ash: config: not found
root@OpenWrt:~#         option type 'mac80211'
-ash: option: not found
root@OpenWrt:~#         option path '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
-ash: option: not found
root@OpenWrt:~#         option channel 'auto'
-ash: option: not found
root@OpenWrt:~#         option band '2g'
-ash: option: not found
root@OpenWrt:~#         option cell_density '0'
-ash: option: not found
root@OpenWrt:~#
root@OpenWrt:~# config wifi-iface 'default_radio0'
-ash: config: not found
root@OpenWrt:~#         option device 'radio0'
-ash: option: not found
root@OpenWrt:~#         option network 'lan'
-ash: option: not found
root@OpenWrt:~#         option mode 'ap'
-ash: option: not found
root@OpenWrt:~#         option ssid 'OpenWrt'
-ash: option: not found
root@OpenWrt:~#         option encryption 'none'
-ash: option: not found
root@OpenWrt:~#         option disabled '1'
-ash: option: not found
root@OpenWrt:~#
root@OpenWrt:~# config wifi-device 'radio1'
-ash: config: not found
root@OpenWrt:~#         option type 'mac80211'
-ash: option: not found
root@OpenWrt:~#         option path '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0+1'
-ash: option: not found
root@OpenWrt:~#         option channel '36'
-ash: option: not found
root@OpenWrt:~#         option band '5g'
-ash: option: not found
root@OpenWrt:~#         option htmode 'VHT80'
-ash: option: not found
root@OpenWrt:~#         option disabled '1'
-ash: option: not found
root@OpenWrt:~#
root@OpenWrt:~# config wifi-iface 'default_radio1'
-ash: config: not found
root@OpenWrt:~#         option device 'radio1'
-ash: option: not found
root@OpenWrt:~#         option network 'lan'
-ash: option: not found
root@OpenWrt:~#         option mode 'ap'
-ash: option: not found
root@OpenWrt:~#         option ssid 'OpenWrt'
-ash: option: not found
root@OpenWrt:~#         option encryption 'none'
-ash: option: not found
root@OpenWrt:~#
root@OpenWrt:~# root@OpenWrt:~# cat /etc/config/dhcp
-ash: root@OpenWrt:~#: not found
root@OpenWrt:~#
root@OpenWrt:~# config dnsmasq
-ash: config: not found
root@OpenWrt:~#         option domainneeded '1'
-ash: option: not found
root@OpenWrt:~#         option boguspriv '1'
-ash: option: not found
root@OpenWrt:~#         option filterwin2k '0'
-ash: option: not found
root@OpenWrt:~#         option localise_queries '1'
-ash: option: not found
root@OpenWrt:~#         option rebind_protection '1'
-ash: option: not found
root@OpenWrt:~#         option rebind_localhost '1'
-ash: option: not found
root@OpenWrt:~#         option local '/lan/'
-ash: option: not found
root@OpenWrt:~#         option domain 'lan'
-ash: option: not found
root@OpenWrt:~#         option expandhosts '1'
-ash: option: not found
root@OpenWrt:~#         option nonegcache '0'
-ash: option: not found
root@OpenWrt:~#         option cachesize '1000'
-ash: option: not found
root@OpenWrt:~#         option authoritative '1'
-ash: option: not found
root@OpenWrt:~#         option readethers '1'
-ash: option: not found
root@OpenWrt:~#         option leasefile '/tmp/dhcp.leases'
-ash: option: not found
root@OpenWrt:~#         option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
-ash: option: not found
root@OpenWrt:~#         option nonwildcard '1'
-ash: option: not found
root@OpenWrt:~#         option localservice '1'
-ash: option: not found
root@OpenWrt:~#         option ednspacket_max '1232'
-ash: option: not found
root@OpenWrt:~#         option filter_aaaa '0'
-ash: option: not found
root@OpenWrt:~#         option filter_a '0'
-ash: option: not found
root@OpenWrt:~#
root@OpenWrt:~# config dhcp 'lan'
-ash: config: not found
root@OpenWrt:~#         option interface 'lan'
-ash: option: not found
root@OpenWrt:~#         option start '100'
-ash: option: not found
root@OpenWrt:~#         option limit '150'
-ash: option: not found
root@OpenWrt:~#         option leasetime '12h'
-ash: option: not found
root@OpenWrt:~#         option dhcpv4 'server'
-ash: option: not found
root@OpenWrt:~#         option dhcpv6 'server'
-ash: option: not found
root@OpenWrt:~#         option ra 'server'
-ash: option: not found
root@OpenWrt:~#         option ra_slaac '1'
-ash: option: not found
root@OpenWrt:~#         list ra_flags 'managed-config'
-ash: list: not found
root@OpenWrt:~#         list ra_flags 'other-config'
-ash: list: not found
root@OpenWrt:~#
root@OpenWrt:~# config dhcp 'wan'
-ash: config: not found
root@OpenWrt:~#         option interface 'wan'
-ash: option: not found
root@OpenWrt:~#         option ignore '1'
-ash: option: not found
root@OpenWrt:~#
root@OpenWrt:~# config odhcpd 'odhcpd'
-ash: config: not found
root@OpenWrt:~#         option maindhcp '0'
-ash: option: not found
root@OpenWrt:~#         option leasefile '/tmp/hosts/odhcpd'
-ash: option: not found
root@OpenWrt:~#         option leasetrigger '/usr/sbin/odhcpd-update'
-ash: option: not found
root@OpenWrt:~#         option loglevel '4'
-ash: option: not found
root@OpenWrt:~#
root@OpenWrt:~# root@OpenWrt:~# cat /etc/config/firewall

my modem and router default IPs are equally same. i didn't change them.

When you right click on putty it pastes back whole selection, try to make it in order editing your post.

1 Like

You are installing ancient openvpn which depends on old openssl. Just type name in filter box above package list and get current version.

It's my problem that the list hardly updates and don't install anything.

You need to get errors from command line.

opkg update
opkg install ....

OK,

root@OpenWrt:~# opkg update
Downloading https://downloads.openwrt.org/releases/23.05.4/targets/ramips/mt7621/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading https://downloads.openwrt.org/releases/23.05.4/targets/ramips/mt7621/packages/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/base/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/luci/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/packages/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/packages/Packages.gz

Downloading https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/routing/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Downloading https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/telephony/Packages.sig
Signature check passed.
Collected errors:
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

Do you get ip6 from provider?

I saw that post

saw this and disabled IPV6

I Don't get ip6 from provider and disabled my IPV6 but same happens. don't know how to disable it on modem if its on Tho. should mention that my openwrt internet speed seems slow and fluctuate or maybe disconnects for fractions of time!

You need >50% packet loss to have connections choking and breaking.
What do you get here: https://www.waveform.com/tools/bufferbloat (link please not picture)
You can select packages in firmware-selector (expand small arrow to customize packages)

I cant access the "waveform.com" because of my region is restricted from accessing it.BUT tried with vpn software :
Result with vpn software

also,
I disabled IPv6 by disabling Wan6 interface, can i ask if thats the right way? and that cause my internet disconnecting. because of that now is enabled.

Use that VPN to download packages or to compose image with packages preinstalled.

I said in the above post that i tried to upload packages
This one
But maybe the download link i used is wrong.
https://downloads.openwrt.org/releases/packages-18.06/mipsel_24kc/

Yes, that is wrong. You need to download from the packages folder for the same version of OpenWrt that you are using. 23.05 will not run 18.06 packages.

1 Like

Yes, your download link is for ancient OpenWRT.

Better use your vpn to make a composite image of packages you need:


(obviously select your device in firmware-selector.openwrt.org and flash the sysupgrade image with added packages)

1 Like