Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to install and run collectd on Solaris 10 x86. I downloaded the Solaris x86 version of the installer. Installed using pkd_add command and chose the default folders.

Now I am trying to run the daemon, but it doesn't seem to work. Here is the problem / error:

bash-3.00# sbin/collectd
bash: sbin/collectd: cannot execute binary file
share|improve this question
    
have you checked if you have 'x' rights on sbin/collectd ? –  Coren Mar 16 '12 at 8:57
    
Yes, I have 'x' rights for sbin and collectd –  TheMaskOfZero Mar 16 '12 at 9:06
1  
What does file sbin/collectd yield? This error typically comes from using a binary made for another platform (SPARC vs x86, Solaris vs Linux, MacOS vs Linux). –  Lars Rohrbach Mar 16 '12 at 22:10
    
@lars-rohrbach Here is what I get: sbin/collectd: ELF 64-bit LSB executable AMD64 Version 1 [SSE2 SSE FXSR FPU], dynamically linked, not stripped –  TheMaskOfZero Mar 19 '12 at 11:26
    
See also Getting "Not found" message when running a 32-bit binary on a 64-bit system You have an executable format that your kernel doesn't support. –  Gilles Mar 26 '12 at 1:01
add comment

1 Answer

Based on your output from file sbin/collectd, you are attempting to execute a binary for AMD64 (also known as x86_64), which I see the collectd website offers in package form for Solaris 10. This will only work on x86_64, not on i386. I suspect that you have i386 (you can double-check with uname -p or uname -a).

Since the collectd folks aren't offering a ready-to-go package for Solaris 10 x86, it seems, the only option would be to compile it from source.

Do you have SUNWspro installed for the Sun cc compiler? I ran into difficulty trying to compile collectd with gcc on Solaris 10 x86, but Sun's cc worked like this:

wget http://collectd.org/files/collectd-5.0.3.tar.bz2
gtar xjf collectd-5.0.3.tar.bz2
cd collectd-5.0.3
./configure CC=/path/to/cc CFLAGS="-m64 -mt -D_POSIX_PTHREAD_SEMANTICS"
make && make install
share|improve this answer
1  
isainfo -v is the Solaris command to determine support for 32-bit/64-bit binaries. –  Tim Kennedy Mar 20 '12 at 23:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.