LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 06-09-2005, 11:46 AM   #1
NightKids
Member
 
Registered: Jan 2004
Distribution: Ubuntu Dapper
Posts: 48

Rep: Reputation: 15
shared libraries error


hi
i'm a newbie in linux, and i installed the Intel C/C++ Compiler and the debugger, and did the hello world same program with the installation guide to test it out. when running ./hello, i get the following errors:

./hello: error while loading shared libraries: libcxaguard.so.5: cannot open shared object file: No such file or directory
 
Old 06-09-2005, 12:10 PM   #2
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
Can you post your 'hello' program and the command line you used to compile and link?
ta0kira
 
Old 06-09-2005, 01:28 PM   #3
NightKids
Member
 
Registered: Jan 2004
Distribution: Ubuntu Dapper
Posts: 48

Original Poster
Rep: Reputation: 15
yes i just wrote the exact same thing that was in the Intel C/C++ Compiler for Linux Getting Started Guide:

hello.c

Code:
#include <iostream>
int main(){
std::cout << "Hello World !" << std::endl;
return 0;}
and then just find and run the compiler
then after 1 second, it got me back to the command line, so i guess the compiling was successful
then i ran the program

Code:
[icet@localhost appz]$ /opt/intel_cc_80/bin/icpc hello.c -o hello
[icet@localhost appz]$ ./hello
./hello: error while loading shared libraries: libcxaguard.so.5: cannot open shared object file: No such file or directory
[icet@localhost appz]$
 
Old 06-09-2005, 01:30 PM   #4
NightKids
Member
 
Registered: Jan 2004
Distribution: Ubuntu Dapper
Posts: 48

Original Poster
Rep: Reputation: 15
and the libcxaguard.so.5 can be found in:

Code:
/opt/intel_cc_80/lib
 
Old 06-09-2005, 04:41 PM   #5
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
Type in `whereis libcxaguard.so.5`. That should tell you where it is. If it doesn't show up, try `find / -name libcxaguard.so.5` (will take a long time). If you find it, check your compiler docs to see if you need to set a runtime lib search directory in an env variable. If you don't find it, that means your install is bad and you should try to reinstall it.
ta0kira
 
Old 06-09-2005, 06:36 PM   #6
NightKids
Member
 
Registered: Jan 2004
Distribution: Ubuntu Dapper
Posts: 48

Original Poster
Rep: Reputation: 15
hmm. i do remember the installation guide saying that environment variables can be set in somethingvar.sh but it was a script and nothing happens when i run the script
 
Old 06-09-2005, 10:27 PM   #7
freegianghu
Member
 
Registered: Oct 2004
Location: somewhere in the street
Distribution: Window$
Posts: 192

Rep: Reputation: 30
Quote:
Originally posted by NightKids
hmm. i do remember the installation guide saying that environment variables can be set in somethingvar.sh but it was a script and nothing happens when i run the script
Append "/opt/intel_cc_80/lib" to /etc/ld.so.conf to tell ld where to find library.
# echo /opt/intel_cc_80/lib >> /etc/ld.so.conf && ldconfig

Cheers,
GH
 
Old 06-10-2005, 10:26 AM   #8
NightKids
Member
 
Registered: Jan 2004
Distribution: Ubuntu Dapper
Posts: 48

Original Poster
Rep: Reputation: 15
Code:
# echo /opt/intel_cc_80/lib >> /etc/ld/conf.so && ldconfig
bash: /etc/ld/conf.so: No such file or directory

This is what gives me when i do "vi iccvars.sh" :

Code:
#! /bin/sh

if [ -z "${PATH}" ]
then
    PATH="/opt/intel_cc_80/bin"; export PATH
else
    PATH="/opt/intel_cc_80/bin:$PATH"; export PATH
fi

if [ -z "${LD_LIBRARY_PATH}" ]
then
    LD_LIBRARY_PATH="/opt/intel_cc_80/lib"; export LD_LIBRARY_PATH
else
    LD_LIBRARY_PATH="/opt/intel_cc_80/lib:$LD_LIBRARY_PATH"; export LD_LIBRARY_PATH
fi

if [ -z "${MANPATH}" ]
then
    MANPATH="/opt/intel_cc_80/man":$(man -w); export MANPATH
else
    MANPATH="/opt/intel_cc_80/man:${MANPATH}"; export MANPATH
fi
"iccvars.sh" [readonly] 30L, 805C                             1,2           Top
 
Old 06-10-2005, 11:04 AM   #9
freegianghu
Member
 
Registered: Oct 2004
Location: somewhere in the street
Distribution: Window$
Posts: 192

Rep: Reputation: 30
Quote:
Originally posted by NightKids
Code:
# echo /opt/intel_cc_80/lib >> /etc/ld/conf.so && ldconfig
bash: /etc/ld/conf.so: No such file or directory
Oh, no!!! Run as root
# echo /opt/intel_cc_80/lib >> /etc/ld.so.conf && ldconfig

You should run iccvars.sh after login. This script make everything better!!!

Cheers,
GH
 
Old 06-10-2005, 02:35 PM   #10
NightKids
Member
 
Registered: Jan 2004
Distribution: Ubuntu Dapper
Posts: 48

Original Poster
Rep: Reputation: 15
ya i did run as root after su see it's # not $

but now i get

Code:
# echo /opt/intel_cc_80/lib >> /etc/ld.so.conf && ldconfig
ldconfig: File /opt/intel_cc_80/lib/libcprts.so is too small, not checked.
ldconfig: File /opt/intel_cc_80/lib/libcxa.so is too small, not checked.
ldconfig: File /opt/intel_cc_80/lib/libcxaguard.so is too small, not checked.
ldconfig: File /opt/intel_cc_80/lib/libunwind.so is too small, not checked.
hmm maybe it was a bad install?

or do i have to login to x window system as root as well with init 3?

i ran the iccvars.sh script, then a few seconds later it got me back to the console, so i duno what happened, then i tried again with the echo thing and still the same
 
Old 06-10-2005, 10:07 PM   #11
freegianghu
Member
 
Registered: Oct 2004
Location: somewhere in the street
Distribution: Window$
Posts: 192

Rep: Reputation: 30
1. "# echo /opt/intel_cc_80/lib >> /etc/ld.so.conf && ldconfig" should be run once.

2. iccvars.sh should be run every time you logged in

3. Your program run now, do it?

Cheers,
GH
 
Old 06-10-2005, 10:45 PM   #12
NightKids
Member
 
Registered: Jan 2004
Distribution: Ubuntu Dapper
Posts: 48

Original Poster
Rep: Reputation: 15
OOOOOOOOOOOOOOOHHHHHHHHHHHHHHHHHHH

now i see!!!!!!!!!!!

yes yes finally THANK YOU SO MUCH

superbe

you're the best

cheers to you too
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
error while loading shared libraries: libstdc++.so.5: cannot open shared object file: Franziss Linux - Newbie 10 06-28-2010 06:47 AM
Urgent !!! rpm: error while loading shared libraries: libelf.so.1: cannot open shared tinaa Linux - Software 5 12-02-2008 04:19 PM
error while loading shared libraries: libdb-4.1.so: cannot open shared object file putquery8581 Linux - Software 1 10-01-2004 08:03 AM
mplayer: error while loading shared libraries: libdvdread.so.3: cannot open shared ob Bruce Hill Slackware 6 12-11-2003 09:34 AM
linux init error in loading shared shared libraries akaran Linux - Software 1 05-28-2003 05:40 AM


All times are GMT -5. The time now is 12:05 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration