Mosquitto 0.5.3 on x86

Asked by kulish

Hello,
     I have installed the mosquitto 0.5.3 on linux x86 but i am unable to run mosquitto on that server . i am getting following error
      "error while loading shared libraries: libwrap.so.0: cannot open shared object file: No such file or directory"
   please help me out

Question information

Language:
English Edit question
Status:
Answered
For:
mosquitto Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Roger Light (roger.light) said :
#1

You need to install the "tcp wrappers" library. The name of the package that contains this library can vary widely, unfortunately. It may be one of:

libwrap
tcpd
tcp-wrappers

Or possibly something else. Try searching for those packages in your package manager.

Which linux distribution are you using?

Revision history for this message
kulish (kkushwaha57) said :
#2

i am using
 Linux ps27433 2.6.33.3-vs2.3.0.36.30.4-swap-nooomloop-nolivelock-oom-jt3 #13 SMP Wed May 26 15:49:33 PDT 2010 x86_64 GNU/Linux

Revision history for this message
Roger Light (roger.light) said :
#3

It looks like you're using one of Dreamhost's PS servers, which I believe run Debian. You should try to install the "libwrap0" package, which can be done using the command:

sudo apt-get install libwrap0

Revision history for this message
kulish (kkushwaha57) said :
#4

hello Roger
i followed your command and i got reply

"Reading package lists... Done
Building dependency tree... Done
libwrap0 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded."

i think libwrap0 was already there, it mosquitto is unable to load shared libraries.
what to do now

Revision history for this message
kulish (kkushwaha57) said :
#5

i am looking for your reply

Revision history for this message
Roger Light (roger.light) said :
#6

Could you please post the results of the following commands:

ldd /usr/sbin/mosquitto
ls -l /usr/lib/libwrap*

If your copy of mosquitto isn't installed in the standard system paths, please replace the path as appropriate, e.g.:

ldd /usr/local/sbin/mosquitto

Thanks

Revision history for this message
kulish (kkushwaha57) said :
#7

These are the response while running your prescribed commands

[ps27433]$ ldd /usr/sbin/mosquitto
ldd: /usr/sbin/mosquitto: No such file or directory
[ps27433]$ ls -l /usr/lib/libwrap*
ls: /usr/lib/libwrap*: No such file or directory
[ps27433]$ ldd /usr/local/sbin/mosquitto
ldd: /usr/local/sbin/mosquitto: No such file or directory

Revision history for this message
Roger Light (roger.light) said :
#8

Let me rephrase the questions.

I need the output of running the "ldd" command on your mosquitto binary. Whichever path you have mosquitto installed into, use that path as the argument for ldd.

I also need to know where libwrap resides - if it's not in /usr/lib (or potentially /usr/lib64 - although you say this is an x86 machine), then the linker won't be able to find it and hence won't be able to load mosquitto. Try "dpkg -L libwrap0" to list the contents of the libwrap0 package.

Revision history for this message
kulish (kkushwaha57) said :
#9

Hi Roger
Here is the output of commands you provided. can you please advise what we are doing wrong and since we are not more familiar with linux. please proviide step step by instruction.

output of :$ ldd /usr/local/bin/mosquitto
/usr/local/bin/mosquitto: /lib32/libc.so.6: version `GLIBC_2.4' not found (required by /usr/local/bin/mosquitto)
        linux-gate.so.1 => (0xffffe000)
        libwrap.so.0 => not found
        libdl.so.2 => /lib32/libdl.so.2 (0xf76d6000)
        libpthread.so.0 => /lib32/libpthread.so.0 (0xf76c5000)
        libc.so.6 => /lib32/libc.so.6 (0xf7599000)
        /lib/ld-linux.so.2 (0xf76e8000)

output of :$ ls -l libwrap*
lrwxrwxrwx 1 root root 16 Jun 29 21:30 libwrap.so.0 -> libwrap.so.0.7.6
-rwxrwxrwx 1 root root 34504 Jul 8 05:23 libwrap.so.0.7.6

Revision history for this message
kulish (kkushwaha57) said :
#10

libwrap is residing in /usr/lib folder

Revision history for this message
Roger Light (roger.light) said :
#11

Step by step instructions. Note that you should be doing these on your server!

* Remove all existing traces of mosquitto from your server - just to be on the safe side!
* Download the latest version of mosquitto from http://mosquitto.org/download - this must be the source code. Currently mosquitto 0.7 is the latest (if you don't have a gui, try using the "wget" command to download - "wget http://mosquitto.org/files/source/mosquitto-0.7.tar.gz" )
* Extract the files from the archive: "tar zxf mosquitto-0.7.tar.gz"
* Move into the source directory: "cd mosquitto-0.7"
* Compile mosquitto: "make"
* Install mosquitto "sudo make install" (note that this will run as the super user because of the "sudo" command)
* Edit /etc/mosquitto.conf to your preferences
* Run mosquitto "/usr/local/sbin/mosquitto -c /etc/mosquitto.conf"

If you get errors along the way, it's possible you haven't got some required packages installed. Even if you have sqlite installed, you may not have the package installed that you need when compiling things that use sqlite.

This command will install the development packages for sqlite and libwrap:

"sudo apt-get install libsqlite3-dev libwrap0-dev"

Revision history for this message
lily tarigan (lily-tarigan) said :
#12

hai roger ...
i got this error whe i run 1000 publisher and 1000 subscriber
"1400219022: Client connection denied access by tcpd."
less than that it works well.
i am using ubuntu and mosquitto version 0.15
what do you think?
Thank you

Can you help with this problem?

Provide an answer of your own, or ask kulish for more information if necessary.

To post a message you must log in.