Opkg always remembers the prevous installation source

I installed the standard libcurl4 by opkg, and then I aware of that it doesn't support HTTP2. I need this feature for some other package. So I compiled the libcur4 from source code with HTTP2 enabled. But I found the new package cannot be installed. Opkg always ignores the local ipk file and gets the online package instead

opkg install ./libcurl4_7.66.0-3_arm_cortex-a9_vfpv3-d16.ipk
Installing libcurl4 (7.66.0-3) to root...
Downloading http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a9_vfpv3-d16/base/libcurl4_7.66.0-3_arm_cortex-a9_vfpv3-d16.ipk
Configuring libcurl4.

I have tried the option --force-xxxx, none get work. I know changing the libcurl version to a higher number can solve this issue. but i don't want to do that. Any suggestion to solve this issue?

Rotuer: WRT1900ACv2
OpenWrt version: 19.07.7

Thanks.

Change/decrease the installed package version:

cp /usr/lib/opkg/status /tmp/opkg-status
vi /usr/lib/opkg/status

https://openwrt.org/docs/guide-user/base-system/user.beginner.cli#editing_files

@vgaetera
I decreased the version in the /usr/lib/opkg/status, but doesn't work either.

# opkg install ./libcurl4_7.66.0-3_arm_cortex-a9_vfpv3-d16.ipk
Upgrading libcurl4 on root from 7.66.0-2 to 7.66.0-3...
Downloading http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a9_vfpv3-d16/base/libcurl4_7.66.0-3_arm_cortex-a9_vfpv3-d16.ipk
Configuring libcurl4.

It looks like the opkg always uses the online version if the same version is found in online repository.

Remove the package lists and repeat:

rm -R -f /tmp/opkg-lists

/tmp/opkg-lists doesn't exist on my router. However, I get success after reboot. Maybe the reboot cleared the cache of opkg. Anyway, I think it's an issue of opkg.
Thank you very much for your help @vgaetera

1 Like

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