Opkg cannot satisfy dependency, but already installed

Hi everyone. I am running a Chaos Calmer 15.05.1 in a router and wanted to install the nano package.
So, I downloaded the nano_4.3-1_x86_64.ipk package, and run opkg install, with the outcome...

Installing nano (4.3-1) to root...
Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for nano:
* libncurses6 *
* opkg_install_cmd: Cannot install package nano.

I then downloaded and installed the package libncurses_6.0-1_x86_64.ipk, which is the libncurses6 missing above (I suppose).
I installed it successfully and then run opkg list-installed, which showed that my package libncurses - 6.0-1 was installed.

However, when I try to install nano again, with the same command as above, it still throws the same error of "satisfy_dependencies_for".

What am I missing?

All packages currently available on downloads.openwrt.org are not compatible with 15.05.

1 Like

Why do you download them manually and don't just let opkg download and install them?
Other than that CC is old, vulnerable and unsupported version. Hence you are advised to upgrade to a later 18.06 version.

2 Likes

Chaos Calmer, from 2015, has not been supported for several years now as an official OpenWrt release. Derivatives of OpenWrt, such as QSDK, are supported by the vendor, not OpenWrt.

It sounds like you've downloaded a package from a current release, which are not compatible with older releases.

Upgrading to a current release, such as 18.06 or a "snapshot" would be the first step to take.

1 Like

Likely because the old cc15.05 system contains opkg feed download definitions that point to the then valid downloads.openwrt.org server (which does not contain the cc15.05 stuff any more) instead of the current archive location for outdated old versions:
https://archive.openwrt.org/chaos_calmer/15.05.1/

@i_mll might either manually download the correct packages from there or edit the opkg feed definition file in /etc/opkg* to point into the correct location.

(but the router should be updated to a newer version)

2 Likes

Well, to put it simple, I can't update the router I have... It was handed to me in the establishment I work in and the only thing I can do with it (as in, what I'm allowed to do) is install packages and perform some network monitoring. Also, the repositories used by its opkg have limited packages (they don't even contain the nano package) and I cannot change the opkg feed file. That's why I started searching for packages for x86_64 (compatible with the router) and tried to install manually.

I've now downloaded the correct nano package (nano_2.4.1-1_x86_64.ipk) for this release (thanks for the tip @hnyman) and it installs successfully (installation with root, without dependency errors).

I executed a "which nano" which showed me that nano is located in /usr/bin/nano.

However, now I have another problem. Even though it installed correctly, when I execute nano it says
-ash: nano: Permission denied. Then, as root, I type nano again and it says: -ash: nano: not found.

Inside the /usr/bin folder, when I try to execute ./nano (which I can see listed in that folder), it throws:
-ash: ./nano: not found. As root, I type ./nano once again and the same error is displayed.

Note: I've also heard about cross compiling, but I don't think it is necessary since, supposedly, I am currently using the right packages for the router's architecture.

Often the error message that shows up when needed libraries aren't present, or otherwise inaccessible.

1 Like

It sounds like it may be that although the router's firmware was based on OpenWrt, it is not OpenWrt. OpenWrt, being open source, is often used as a basis by OEMs and other third parties for their firmware. In general, these are not compatible with OpenWrt itself.

You may gain some leverage with your management by pointing out the security issues with a five-year-old kernel and the time you need to take to try to accomplish your task, as compared to flashing a current version of the firmware.

3 Likes

@jeff, ok that makes sense. But still, the installation executed perfectly:

$ opkg install nano_2.4.1-1_x86_64.ipk
Installing nano (2.4.1-1) to root...
Configuring nano.

and after that, "nano" appeared on /usr/bin. How weird.

Well yes, actually it is a modified version of OpenWrt, even though it has Chaos Calmer as its base.
So what you're saying is that this problem of nano being inaccessible, even though I installed it, could be because the router has a "tailored" version of OpenWrt?

Guess I will have to talk with the management team...

Also, would cross compiling help me to get the suited packages for this modified OpenWrt? Or maybe using the SDK?

[EDIT] how could a update help me, if I'm using the correct packages for this architecture and it still does not work? I hope this does not sound rude, I really don't know the answer
[EDIT2] The "management team" is a very "closed" team and they want me to do whatever I want with the router, but I don't think they would be open for a update or OS change, that's why I'm thinking about other solutions for this problem

You would need the original source to make sure that your packages linked properly. Just because the architecture is the same doesn't mean that the binaries are compatible with each other (or the kernel/OS).

I still think that any rational management would welcome a quicker, more robust, forward-looking approach, especially one that removed a large number of well-known and actively exploited security issues.

1 Like

OpenWrt 15.05 uses uClibc as C runtime, while current versions use musl libc. The Not found error means that the musl-linked nano executable cannot locate its expected ELF interpreter /lib/ld-musl-x86_64.so.1 on your system.

You could probably try to setup some kind of chroot on your system by unpacking https://downloads.openwrt.org/releases/18.06.4/targets/x86/64/openwrt-18.06.4-x86-64-generic-rootfs.tar.gz into some directory or by extracting the C runtime from the above archive (./lib/ld-musl-x86_64.so.1, ./lib/libc.so) into your devices /lib but I am not sure whether this still works or whether it would clash with existing system files.

3 Likes