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".
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.
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.
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.
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.
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.