LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-29-2014, 12:37 AM   #1
Robert Chiu
LQ Newbie
 
Registered: Jan 2014
Location: Shenzhen China
Posts: 25

Rep: Reputation: Disabled
"bad ELF interpreter", What is wrong with my system?


I just install a new system ,centos 6.4, 64bit.

When I trying to run "source", the error occured. What is the problem? I never changed the "/etc/profile",just run "source" command.

Code:
[root@localhost etc]# source profile
-bash: /usr/local/spes/acc-1: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
[root@localhost etc]# source profile
-bash: /usr/local/spes/acc-1: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
 
Old 01-29-2014, 12:40 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
would be nice to see the content of that file
 
Old 01-29-2014, 12:42 AM   #3
Robert Chiu
LQ Newbie
 
Registered: Jan 2014
Location: Shenzhen China
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
would be nice to see the content of that file
of course, the following is the content of file :
Quote:
[root@localhost etc]# cat /etc/profile
# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

# It's NOT a good idea to change this file unless you know what you
# are doing. It's much better to create a custom.sh shell script in
# /etc/profile.d/ to make custom changes to your environment, as this
# will prevent the need for merging in future updates.

pathmunge () {
case ":${PATH}:" in
*:"$1":*)
;;
*)
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
esac
}


if [ -x /usr/bin/id ]; then
if [ -z "$EUID" ]; then
# ksh workaround
EUID=`id -u`
UID=`id -ru`
fi
USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
fi

# Path manipulation
if [ "$EUID" = "0" ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
else
pathmunge /usr/local/sbin after
pathmunge /usr/sbin after
pathmunge /sbin after
fi

HOSTNAME=`/bin/hostname 2>/dev/null`
HISTSIZE=1000
if [ "$HISTCONTROL" = "ignorespace" ] ; then
export HISTCONTROL=ignoreboth
else
export HISTCONTROL=ignoredups
fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL

# By default, we want umask to get set. This sets it for login shell
# Current threshold for system reserved uid/gids is 200
# You could check uidgid reservation validity in
# /usr/share/doc/setup-*/uidgid file
if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then
umask 002
else
umask 022
fi

for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
if [ "${-#*i}" != "$-" ]; then
. "$i"
else
. "$i" >/dev/null 2>&1
fi
fi
done

unset i
unset -f pathmunge
[root@localhost etc]#
 
Old 01-29-2014, 12:46 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
I can't find anything related, probably you have some scripts in /etc/profile.d?
 
Old 01-29-2014, 12:49 AM   #5
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,339

Rep: Reputation: Disabled
Quote:
Originally Posted by Robert Chiu View Post
When I trying to run "source", the error occured. What is the problem? I never changed the "/etc/profile",just run "source" command.

Code:
[root@localhost etc]# source profile
-bash: /usr/local/spes/acc-1: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
[root@localhost etc]# source profile
-bash: /usr/local/spes/acc-1: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
The error message says that the file /usr/local/spes/acc-1, called by bash, is running into some kind of problem related to the library file /lib/ld-linux.so.2.

The script does not directly reference "acc-1" (and I couldn't find it on my system), so you may want to try calling profile with bash -x /etc/profile just to see what's really going on.

Also, the output from these commands may provide some clues:
Code:
file /usr/local/spes/acc-1
ldd /usr/local/spes/acc-1
file /lib/ld-linux.so.2
 
Old 01-29-2014, 12:50 AM   #6
Robert Chiu
LQ Newbie
 
Registered: Jan 2014
Location: Shenzhen China
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
I can't find anything related, probably you have some scripts in /etc/profile.d?
I do nothing, just a new system. All the config file is default. It is really strange. Any module was lost?
 
Old 01-29-2014, 01:06 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
So try what was suggested in #5: bash -xv /etc/profile
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"bash: /usr/bin/: /lib/ld-linux.so.2: bad ELF interpreter: No such file or direc LittleMaster Linux - Server 4 05-25-2013 03:42 AM
"bad interpreter : no such file or directory" when configure "flex" acer_peri Linux - Software 10 11-10-2010 01:19 AM
"Mount: wrong file system type, bad option, bad superblock" User Name. Linux - Newbie 9 09-03-2008 03:40 PM
Bad mount of .mdf - "wrong fs type, bad option, bad superblock, on /dev/loop0" Maybe-not Linux - General 2 02-29-2008 01:30 PM
Gmail notifier gives error: "wrong ELF class: ELFCLASS32" aero_b Linux - Newbie 13 03-01-2007 07:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration