Install Packages While Offline?

I have successfully flashed 19.07.3 on my TP-Link AC1750 v2. I can SSH into it and everything seems fine. Only thing is that it doesn't have an internet connection ATM. I want to add USB support. Is there any way of downloading the necessary packages on my laptop and installing them locally instead of with OPKG? I've been reading the forums and found some posts about Imagebuilder but that seems to require Linux which would require me to set up a VM, I guess, and then learn Linux. Is there any way to go about this using Windows?

You'll need internet access to get the packages, but once you have them you can just use putty to transfer them to your tp-link and install them, for example, kmod-fs-ext4 -

scp root@192.168.1.1 kmod-fs-ext4.ipk :/tmp

Then ssh in, cd to /tmp and

opkg install kmod-fs-ext4.ipk

4 Likes

Use SCP to copy from laptop to device /tmp

Then use opkg to install the package from /tmp

Opkg documentation

https://openwrt.org/docs/guide-user/additional-software/opkg

3 Likes

Where do I get the .ipk files?
I've checked the github repositories linked from the Package Table page, but all I see is source code files.

1 Like

Some are at the bottom of the images page.
The rest are here and you'll have to follow the link for your router. You can see it with uname -m

Thanks! I've been digging for that information for hours. How did you know where to find those pages?

Side note for anyone on the same quest: The Atheros QCA9558 SoC found in the Archer C7 / AC1750 v2 uses a MIPS 74KC processor.

Experience, mostly.

1 Like

You can find that out from your router. Here is example from my ath79 WNDR3700v2 currently running an 19.07 build

 OpenWrt 19.07-SNAPSHOT, r11104-e752fc1ff9
 -----------------------------------------------------

root@router2:~# cat /etc/opkg/distfeeds.conf
src/gz openwrt_core http://downloads.openwrt.org/releases/19.07-SNAPSHOT/targets/ath79/generic/packages
src/gz openwrt_base http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/mips_24kc/base
src/gz openwrt_luci http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/mips_24kc/luci
src/gz openwrt_packages http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/mips_24kc/packages
src/gz openwrt_routing http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/mips_24kc/routing
src/gz openwrt_telephony http://downloads.openwrt.org/releases/19.07-SNAPSHOT/packages/mips_24kc/telephony

It shows the package site links pretty clearly.
And once you now that the package dirs exist there, it is pretty easy to navigate to them.

The releases download top dir provides the easiest starting place:
https://downloads.openwrt.org/releases/

(that dir is usually skipped over when you start from downloads top, it then navigates directly to downloads/19.07.3 etc., and does not show this overview.

Ha, thanks, wiseguy :slight_smile:

Sa-weeeeet!

That's exactly what I was looking for, thank you.

Out of curiousity, is there any way to read distfeeds.conf from within Luci?

You haven't looked for that? It is pretty easily found from the Software page:

Dialog with the links:

2 Likes

There it is!
I'm also the guy who can't find the mayonnaise in the fridge if it's behind the ketchup.

1 Like

Despite having the ipk already downloaded, opkg wants to re-download it and fails:

root@myrouter:/tmp# pwd
/tmp
root@ myrouter:/tmp# ls -l libunbound_1.17.0-1_arm_cortex-a9_vfpv3-d16.ipk
-rw-r--r--    1 root     root        422897 Nov 25 14:15 libunbound_1.17.0-1_arm_cortex-a9_vfpv3-d16.ipk
root@ myrouter:/tmp# opkg install /tmp/libunbound_1.17.0-1_arm_cortex-a9_vfpv3-d16.ipk
Upgrading libunbound on root from 1.16.0-1 to 1.17.0-1...
Downloading https://downloads.openwrt.org/releases/21.02.3/packages/arm_cortex-a9_vfpv3-d16/packages/libunbound_1.17.0-1_arm_cortex-a9_vfpv3-d16.ipk
Collected errors:
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/21.02.3/packages/arm_cortex-a9_vfpv3-d16/packages/libunbound_1.17.0-1_arm_cortex-a9_vfpv3-d16.ipk, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_install_pkg: Failed to download libunbound. Perhaps you need to run 'opkg update'?
 * opkg_install_cmd: Cannot install package libunbound.

Have you tried opkg install libunbound --cache /tmp/ ?

1 Like

Yes, I did. But it did the same thing.

The fix was to just reboot the router, and then do "opkg install /tmp/libunbound-xxx.ipk" again. It worked after rebooting.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.