What's new

iftop error: iftop: can't load library 'libncurses.so.5'

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

bobyang

Regular Contributor
Hi,

I have install iftop without problems but when I run I got an error. I just wonder if anyone knows how to solve this problem. thanks!

Code:
admin@ya:/tmp/mnt/USB_LOGS/asusware.arm/bin# ipkg install iftop
Installing iftop (0.17-4) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/mbwe-bluering/cross/stable/iftop_0.17-4_arm.ipk
Configuring iftop
Successfully terminated.

admin@ya:/tmp/mnt/USB_LOGS/asusware.arm/bin# iftop
iftop: '/opt/lib/libncurses.so.5' is not an ELF file
iftop: can't load library 'libncurses.so.5'
admin@ya:

thanks!
 
Hi RMerlin,

I just wonder if you know about this? I search in google but I haven't found anything work for me yet.

thanks!
 
Make sure you don't have leftovers from a MIPS router, which would lead to your /opt directory containing a mixture of MIPS and ARM binaries. If that USB disk was previously used on a MIPS-based router then you should wipe out /opt and reinstall Optware from scratch.
 
Make sure you don't have leftovers from a MIPS router, which would lead to your /opt directory containing a mixture of MIPS and ARM binaries. If that USB disk was previously used on a MIPS-based router then you should wipe out /opt and reinstall Optware from scratch.


I guess not.. this is a new formatted USB drive under this router. anything I should take care of?

thanks!
 
I guess not.. this is a new formatted USB drive under this router. anything I should take care of?

thanks!

I tried it and it works fine here. Is your drive formatted as ext2/ext3/ext4? This is required for Optware.

Your log doesn't show the installation of libpcap, which should have been installed at the same time, unless there was already a version installed. Try manually installing it:

Code:
ipkg uninstall libpcap
ipkg install libpcap

If it won't work then just delete the /opt folder and start over from scratch.
 
Last edited:
Thanks. I got the following when I try. so I decide to format USB again.

admin@ya:/tmp/mnt/USB_LOGS/asusware.arm/bin# ipkg install libpcap
ipkg: can't load library 'libipkg.so.0'

1. I format USB through computer
2. plug into router and go to USB
3. install "Download Manager"
4. uninstall "Download Manager"
5. ipkg install iftop

Code:
admin@ya:/tmp/mnt/USB_LOG/asusware.arm/bin# ipkg install iftop
Installing iftop (0.17-4) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/mbwe-bluering/cross/stable/iftop_0.17-4_arm.ipk
Installing libpcap (1.3.0-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/mbwe-bluering/cross/stable/libpcap_1.3.0-1_arm.ipk
Configuring iftop
Configuring libpcap
Successfully terminated.


Code:
# iftop
interface: eth0
IP address is: 42.12.34.14
MAC address is: 60:a4:4c:aa:b2:54
Error opening terminal: xterm.


anything I should look at?

thanks!
 
Code:
# iftop
interface: eth0
IP address is: 42.12.34.14
MAC address is: 60:a4:4c:aa:b2:54
Error opening terminal: xterm.


anything I should look at?

thanks!

That error means your SSH client uses an xterm emulation. Switch it to linux or VT100.
 
Glad you are here Merlin!

I use putty, I change "keyboard" to linux or vt100+ and go to "data" change "terminal-type string" to linux or vt100-plus

I got similar error "Error opening terminal: vt100-plus."

http://wiki.centre.edu/its/index.php/PuTTy_Installation_and_Settings

thanks

The name in the terminal string is important it must match precisely the name of a supported terminal. "vt100-plus" isn't known by the firmware, it must be exactly "vt100" or "linux".

I use Xshell4 here, with a "linux" terminal emulation, and it worked fine with iftop.
 
The name in the terminal string is important it must match precisely the name of a supported terminal. "vt100-plus" isn't known by the firmware, it must be exactly "vt100" or "linux".

I use Xshell4 here, with a "linux" terminal emulation, and it worked fine with iftop.

thank you. I think some other setting I need to check in putty then.. I will use Xshell4 and give it a try first if it is easier :)

by the way, I like to learn. how do you know the string must be vt100 or linux? I am still search about iftop terminal string.

thanks!

update: Xshell works perfectly! I love it! I am going to switch! thanks for such great tool!
 
Last edited:
thank you. I think some other setting I need to check in putty then.. I will use Xshell4 and give it a try first if it is easier :)

by the way, I like to learn. how do you know the string must be vt100 or linux? I am still search about iftop terminal string.

thanks!

I know that "linux" works because that's what I had set here. I expect vt100 to also work because it's a fairly basic terminal (but I admit I didn't specifically test it).

Supported terminals are defined in the termcap file. It got installed with libncurse, and sits under /opt/etc/termcap. I don't know however if iftop will properly work with all the terminals defined in that termcap file. It might also work with other terminal definitions, but I don't know the list. Personally I always work with linux, vt100 or vt102 with my Linux boxes.
 
I know how to recreate the problem...

1. after installation, make sure iftop can run correct without any problems.
2. stop iftop
3. unplug USB from the router and wait for a minute
4. plug USB back and wait for the router to auto mount
5. go to SSH again, and make sure the drive is mounted correctly.
6. run iftop and then I got error...

Code:
admin@ya:/tmp/mnt/USB_LOG/asusware.arm/sbin# iftop
iftop: can't load library 'libpcap.so.1'

in the other words, it seems like whenever I remove USB drive, I need to format and re-install everything again. Is there anyway I can prevent this happening?

thanks!
 
I know how to recreate the problem...

1. after installation, make sure iftop can run correct without any problems.
2. stop iftop
3. unplug USB from the router and wait for a minute
4. plug USB back and wait for the router to auto mount
5. go to SSH again, and make sure the drive is mounted correctly.
6. run iftop and then I got error...

Code:
admin@ya:/tmp/mnt/USB_LOG/asusware.arm/sbin# iftop
iftop: can't load library 'libpcap.so.1'

in the other words, it seems like whenever I remove USB drive, I need to format and re-install everything again. Is there anyway I can prevent this happening?

You can't remove a disk that contains applications and libraries - you will need to reboot your router for Optware to be properly detected and configured by the firmware. The error message you have simply indicates the router no longer knows where to find that library, you just need to reboot your router.
 
You can't remove a disk that contains applications and libraries - you will need to reboot your router for Optware to be properly detected and configured by the firmware. The error message you have simply indicates the router no longer knows where to find that library, you just need to reboot your router.


I try reboot few times and it didn't work...

I am in the process of re-formating USB and install download manager now. I will update afterwards.

should I use shutdown, wait, then on again instead of using reboot?

thanks
 
I try reboot few times and it didn't work...

I am in the process of re-formating USB and install download manager now. I will update afterwards.

should I use shutdown, wait, then on again instead of using reboot?

thanks


I just test it doesn't work, even without removing USB drive.

1. after installation everything, make sure iftop works
2. reboot
3. wait for 2 minutes to have everything fully loaded
4. I got an error "iftop: can't load library 'libpcap.so.1'"
5. I tried to go through mnt, I found the name has been change from "USB_LOGS" to "USB_LOGS(1)" by itself.


thanks
 
I just test it doesn't work, even without removing USB drive.

1. after installation everything, make sure iftop works
2. reboot
3. wait for 2 minutes to have everything fully loaded
4. I got an error "iftop: can't load library 'libpcap.so.1'"
5. I tried to go through mnt, I found the name has been change from "USB_LOGS" to "USB_LOGS(1)" by itself.


thanks

follow up

6. I turn off for 3 minutes
7. turn on for 2 minutes
8. get into SSH, and I can get into opt this time
9. run iftop

Code:
admin@ya:/tmp/mnt/USB_LOGS/asusware.arm/sbin# iftop
iftop: can't load library 'libpcap.so.1'

summary. it seems like after reboot or shutdown, it won't work.

thanks
 
I have no other idea then. I reboot my router regularly, and my installed Optware software still work properly after a reboot. Someone with more experience with Optware might know - all I do is install nano through it, then forget it even exists.
 
I have no other idea then. I reboot my router regularly, and my installed Optware software still work properly after a reboot. Someone with more experience with Optware might know - all I do is install nano through it, then forget it even exists.

thanks! I just wonder if AC56U behavior differently with ARM for OPTWARE?
I used tomatousb with MIR and never has this problem either... I will do more research. if I can find something and make it work, I will update info.

Code:
admin@ya:/tmp/opt/bin# ipkg install nano
Installing nano (2.2.6-1) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/mbwe-bluering/cross/stable/nano_2.2.6-1_arm.ipk
Configuring nano
Successfully terminated.
admin@ya:/tmp/opt# cd sbin
admin@ya:/tmp/mnt/USB_LOGS/asusware.arm/sbin# nano
nano: can't load library 'libncurses.so.5'

thanks a lot!

do you know how to prevent the folder name in mnt get change like adding (1) to the back? and as long as I shutdown and wait, then it removes by itself again.

thanks!
 
fixed.... I don't know where I fix it.. but here is how it works work me.

1. use computer with Mini Partition manager to delete USB partition.
2. create ext2 partition
3. remove and delete again
4. create fat2 partition again
5. remove and delete again
6. create ext2 partition again (don't ask me why repeat 3 times.. I don't know i tried only once, twice and it won't work....)
7. then just regular process...

then everything works after reboot or shutdown or unplug and replug!

wonderful!!

thanks
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top