wrong ELF class: ELFCLASS32 when trying to run ps as particular user


 
Thread Tools Search this Thread
Operating Systems Solaris wrong ELF class: ELFCLASS32 when trying to run ps as particular user
# 1  
Old 06-03-2009
wrong ELF class: ELFCLASS32 when trying to run ps as particular user

I get the following error when running /usr/bin/ps on Solaris 10 as a particular non-privileged user:
Code:
ld.so.1: ps: fatal: /usr/dt/lib/libXm.so.3: wrong ELF class: ELFCLASS32
Killed

However I can run /usr/bin/ps successfuly as root or as any other non-privileged user. What could it be about this user that's causing this? Their environment doesn't look that different.
# 2  
Old 06-03-2009
first check with ldd ld.so.1

provide the output of bellow info

file ldd ld.so.1
and
file /usr/dt/lib/libXm.so.3

As per my understanding this is due to the fact that you are pointing
to a 32 bit shared object.

And check that user's LD_LIBRARY_PATH path is correct

Last edited by Neo; 04-08-2019 at 04:15 AM..
# 3  
Old 06-03-2009
Also the output from:
Code:
$ type ps

and
Code:
$ whereis ps

as the troublesome user.
# 4  
Old 06-04-2009
Here's the requested info, note that the blank LD_LIBRARY_PATH is the same as for root and the users for who ps works:
Code:
-bash-3.00$ file ldd ld.so.1
ldd:            cannot open: No such file or directory
ld.so.1:        cannot open: No such file or directory

-bash-3.00$ file /usr/dt/lib/libXm.so.3
/usr/dt/lib/libXm.so.3: ELF 32-bit LSB dynamic lib 80386 Version 1, dynamicallylinked, not stripped, no debugging information available

-bash-3.00$ echo $LD_LIBRARY_PATH

-bash-3.00$

-bash-3.00$ uname -a
SunOS localhost 5.10 Generic_138889-08 i86pc i386 i86pc

-bash-3.00$ type ps
ps is /usr/bin/ps
-bash-3.00$ whereis ps
-bash: whereis: command not found
-bash-3.00$ which ps
/usr/bin/ps

# 5  
Old 06-04-2009
file ldd ld.so.1 (sorry its a typing mistake)

file ld.so.1 (whats the out put ?)

-----Post Update-----

now if you check the other users(where ps is not giving any error) env
Code:
$LD_LIBRARY_PATH

you will get the correct path.

So add this env variable
Code:
 $LD_LIBRARY_PATH

to your users profile. That will solve your problem.

-----Post Update-----

now if you check the other users(where ps is not giving any error) env $LD_LIBRARY_PATH you will get the correct path.

So add this env variable $LD_LIBRARY_PATH to your users profile. That will solve your problem.
# 6  
Old 06-04-2009
Ok I've solved it now, the user's .bash_profile had this in it:
Code:
LD_PRELOAD="/usr/dt/lib/libXm.so.3"
export LD_PRELOAD

Commenting that out fixed it
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Install Apache 2.4.20 on Solaris 10 --- Error "ld: fatal: file ab.o: wrong ELF class: ELFCLASS32"

I am following the "Compilling and Installing" guide from Apache > HTTP Server > Documentation > Version 2.4 page The configure running OK: # export CC="gcc -m64" # ./configure \ --prefix=/usr/local/apache2/httpd-2.4.20 \ --with-port=80 \ --with-mpm=worker \ --enable-mods-shared=most \... (0 Replies)
Discussion started by: jhuang
0 Replies

2. Homework & Coursework Questions

When I run the script, the cursor starts on the wrong line?

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: It's a shell script using a looping logic, trap, tput, if, while. Most of the scripts in this book aren't written... (2 Replies)
Discussion started by: ckleinholz
2 Replies

3. Red Hat

Not able to run any command /lib64/ld-Linux-x86-64.so.2: bad ELF interpreter

Hi, I accidentally did this: wadhwaso@nxsdgd01 deps]$sudo rpm -e --nodeps glibc-2.5-107.x86_64 error: %postun(glibc-2.5-107.x86_64) scriptlet failed, exit status 255 and since then I am not able to run any command on this server except 'cd'. I always get the following error: $ ls... (6 Replies)
Discussion started by: stunn3r
6 Replies

4. Shell Programming and Scripting

Wrong output when run via Cron

Hello, This may be a simple one, but i can't see what the issue is. When i run the script via CLI, then i get the correct output via the if statement, but when i run via CRON i get the wrong statement. echo " Checking Job Status" >> $DIR/Bpimagecleanup_$DATE... (3 Replies)
Discussion started by: Junes
3 Replies

5. Solaris

run a service via startup script (correct me if I am wrong)

Environment Solaris 9 I have configured the Solaris9 as NTP client in which Solaris9 is syncing the time with a windows2008 R2 Server which is runing fine. Now I want that the xntpd service should start at startup. I did this via a script. Kindly correct if I did any thing wrong: 1.)Made... (9 Replies)
Discussion started by: z_haseeb
9 Replies

6. Solaris

Wrong ELF data format: ELFDATA2MSB at /usr/perl5/5.8.4/lib/i86pc-solaris-64int/DynaLoader.pm

We are trying to install our project on solaris 10 x86 machine. we are getting the following error. Can't load '/u01/apps/WatchMark/FlexPM//R39FOA1/sw/perl/lib/auto/DBI/DBI.so' for module DBI: ld.so.1: perl: fatal: /u01/apps/WatchMark/FlexPM//R39FOA1/sw/perl/lib/auto/DBI/DBI.so: wrong ELF data... (3 Replies)
Discussion started by: Jagandadi
3 Replies

7. Solaris

Wrong ELF class

guys anyone knows a solution for this? wrong ELF class: ELFCLASS64 pwrcard:cms-dev:/pcard16/pwrcard/src/interfaces/interface_host>isainfo -v 64-bit sparcv9 applications vis2 vis 32-bit sparc applications vis2 vis v8plus div32 mul32... (1 Reply)
Discussion started by: q8devilish
1 Replies

8. Programming

Filling the class from values taken from user input

I have a program that accepts user input. For example I have mdacc that the user sets the value. I then have a class which stores the value set by the user. I use set_param to set the values in the class. I pass through it the list of user defines arguments from argv. What would be the opinion on... (0 Replies)
Discussion started by: kristinu
0 Replies

9. UNIX for Dummies Questions & Answers

Unix user login class

Hello - Could anyone please explain what is login class in unix..? is it supported by Linux, AIX, HP-UX, Solaris? Also how do we update this when a user is created? I looked into man pages for useradd/usermod and mkuser, but could not find any option to add/update login class for a user. ... (5 Replies)
Discussion started by: manju--
5 Replies

10. Programming

STL Iterator and user-defined class

Is is possible to make STL-Iterator to work with user defined class ,like the one below? #include <iostream> #include <stdexcept> using namespace std; template <class T> class Array { public: T& operator (unsigned i) throw(out_of_range) { return data_; } protected: ... (2 Replies)
Discussion started by: johnbach
2 Replies
Login or Register to Ask a Question