LinuxQuestions.org
Review your favorite Linux distribution.
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 10-03-2012, 12:55 AM   #1
cent_sangeeta
LQ Newbie
 
Registered: Sep 2012
Location: kathmandu,Nepal
Posts: 22

Rep: Reputation: Disabled
Problem in installing CISL's NCL due to shared libraries: libbz2.so.1.0


Hi
I have i686 machine with centos 6.I am trying to install CISL's NCAR Command Language but problem arises due to libbz2.so.1.0
on giving command I get,

[root@tu-localhos Desktop]# ng4ex gsun01n

NCAR Graphics NCL Example <gsun01n>


This example was set up to display the output to an
X11 window.

Copying gsun01n.ncl

Running NCL...
ncl: error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory

ncl failed.

so I tried to locate libbz2.so.1.0 and I got
[root@tu-localhost Desktop]# locate libbz2.so.1.0
/lib/libbz2.so.1.0.4


Sangeeta Maharjan
 
Old 10-03-2012, 01:05 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
CentOS 6, bzip2-libs-1.0.5-*

Providing : /lib/libbz2.so.1 ,/lib/libbz2.so.1.0.4


You can just add the symlink "libbz2.so.1.0" : 1) cd lib/
2) su
3) ln -s libbz2.so.1.0.4 libbz2.so.1.0


.
 
Old 10-03-2012, 01:40 AM   #3
cent_sangeeta
LQ Newbie
 
Registered: Sep 2012
Location: kathmandu,Nepal
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
CentOS 6, bzip2-libs-1.0.5-*

Providing : /lib/libbz2.so.1 ,/lib/libbz2.so.1.0.4


You can just add the symlink "libbz2.so.1.0" : 1) cd lib/
2) su
3) ln -s libbz2.so.1.0.4 libbz2.so.1.0


.
Hi,

[root@tu-localhost Desktop]# ln -s /lib/libbz2.so.1.0.4 /lib/libbz2.so.1.0
ln: creating symbolic link `/lib/libbz2.so.1.0': File exists

Sorry, I didn't understand u well.do I need to download bzip2-libs-1.0.5-* and I have no idea about symlink so I try to find it


Thanks,
Sangeeta Maharjan
 
Old 10-03-2012, 01:53 AM   #4
cent_sangeeta
LQ Newbie
 
Registered: Sep 2012
Location: kathmandu,Nepal
Posts: 22

Original Poster
Rep: Reputation: Disabled
hi Knudfl,
I have Downloaded bzip2-libs-1.0.5-7.el6_0.i686.rpm and installed it but again my ncl didnot worke well so I removed it.To my surprise ,I get following messages

1st command->
[root@tu-localhost Downloads]# rpm -q bzip2-libs-1.0.5-7.el6_0.i686.rpm
package bzip2-libs-1.0.5-7.el6_0.i686.rpm is not installed

2nd command ->
[root@tu-localhost Downloads]# rpm -i bzip2-libs-1.0.5-7.el6_0.i686.rpm
package bzip2-libs-1.0.5-7.el6_0.i686 is already installed
3rd command->
[root@tu-localhost Downloads]# rpm -q bzip2-libs-1.0.5-7.el6_0.i686.rpm
package bzip2-libs-1.0.5-7.el6_0.i686.rpm is not installed

4th command ->
[root@tu-localhost Downloads]# rpm -i bzip2-libs-1.0.5-7.el6_0.i686.rpm
package bzip2-libs-1.0.5-7.el6_0.i686 is already installed

Thanks,
Sangeeta Maharjan
 
Old 10-03-2012, 02:48 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
You are not supposed to install anything with # rpm -i

'rpm -i ' is for the exceptions, where you want two versions of a library.
And from the beginning you already had the correct package.
( The system command for package install is # rpm -Uvh )
For all package install, please use yum, if possible.


rpm -q bzip2-libs-1.0.5-7.el6_0.i686.rpm : Not a valid package name.
The package name can be verified with : $ rpm -qa | grep bzip2-libs


Post # 1 says you have : /lib/libbz2.so.1.0.4
Then it's simply # ln -s libbz2.so.1.0.4 libbz2.so.1.0

.

Last edited by knudfl; 10-03-2012 at 02:51 AM.
 
2 members found this post helpful.
Old 10-03-2012, 03:21 AM   #6
cent_sangeeta
LQ Newbie
 
Registered: Sep 2012
Location: kathmandu,Nepal
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
You are not supposed to install anything with # rpm -i

'rpm -i ' is for the exceptions, where you want two versions of a library.
And from the beginning you already had the correct package.
( The system command for package install is # rpm -Uvh )
For all package install, please use yum, if possible.


rpm -q bzip2-libs-1.0.5-7.el6_0.i686.rpm : Not a valid package name.
The package name can be verified with : $ rpm -qa | grep bzip2-libs


Post # 1 says you have : /lib/libbz2.so.1.0.4
Then it's simply # ln -s libbz2.so.1.0.4 libbz2.so.1.0




.
Knudlf,
It worked,
rpm -Uvh bzip2-libs-1.0.5-7.el6_0.i686.rpm

[root@tu-localhost Desktop]# locate libbz2.so.1.0
/lib/libbz2.so.1.0
/lib/libbz2.so.1.0.4

But another thing I didnt understand is while giving command ng4ex gsun01n it worked but didn't get [root@tu-localhost Desktop]# to go further

[root@tu-localhost Desktop]# ng4ex gsun01n

NCAR Graphics NCL Example <gsun01n>


This example was set up to display the output to an
X11 window.

Copying gsun01n.ncl

Running NCL...
Copyright (C) 1995-2012 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.1.0-beta
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.






Thanks,
Sangeeta Maharjan
 
Old 10-03-2012, 05:07 AM   #7
cent_sangeeta
LQ Newbie
 
Registered: Sep 2012
Location: kathmandu,Nepal
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cent_sangeeta View Post
Knudlf,
It worked,
rpm -Uvh bzip2-libs-1.0.5-7.el6_0.i686.rpm

[root@tu-localhost Desktop]# locate libbz2.so.1.0
/lib/libbz2.so.1.0
/lib/libbz2.so.1.0.4

But another thing I didnt understand is while giving command ng4ex gsun01n it worked but didn't get [root@tu-localhost Desktop]# to go further

[root@tu-localhost Desktop]# ng4ex gsun01n

NCAR Graphics NCL Example <gsun01n>


This example was set up to display the output to an
X11 window.

Copying gsun01n.ncl

Running NCL...
Copyright (C) 1995-2012 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.1.0-beta
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.






Thanks,
Sangeeta Maharjan
Hi,I was bit hurry in last post.Actually it worked succesfully.
[root@tu-bjoe5p8o88wl Desktop]# ng4ex gsun01n

NCAR Graphics NCL Example <gsun01n>


This example was set up to display the output to an
X11 window.

Copying gsun01n.ncl

Running NCL...
Copyright (C) 1995-2012 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.1.0-beta
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.

Finished running 'ncl < gsun01n'...

But again I encountered the problem in next command
[root@tu-bjoe5p8o88wl Desktop]# ncargex cpex08 -clean

NCAR Graphics Fortran Example <cpex08>

Copying cpex08.f

Copying cpexcc.f

Compiling and linking...
gfortran -fPIC -fno-second-underscore -fno-range-check -O -o cpex08 cpexcc.f cpex08.f -L/usr/local/lib -lncarg -lncarg_gks -lncarg_c -lX11 -lXext -lcairo -lXrender -lfontconfig -lpixman-1 -lfreetype -lexpat -lpng -lz -lbz2 -lpthread
/usr/bin/ld: cannot find -lexpat
collect2: ld returned 1 exit status

The compile and link failed.

Sangeeta Maharjan
 
Old 10-03-2012, 05:15 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 6

User commands are not supposed to be run as root.

Your "user command" examples :
[root@tu-localhos Desktop]# ng4ex gsun01n
[root@tu-localhost Desktop]# locate libbz2.so.1.0
[root@tu-localhost Downloads]# rpm -q bzip2-libs-1.0.5-7.el6_0.i686.rpm
[root@tu-localhost Desktop]# locate libbz2.so.1.0
They can all be run as unprivileged user.
And : The most "GUI applications commands" will not work as root.

Please try the "ng4ex gsun01n command" as unprivileged user.

Root is for administrative tasks only. And using root is unsafe.

.
 
Old 10-03-2012, 05:19 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 7
Quote:
/usr/bin/ld: cannot find -lexpat
-lexpat = libexpat.so

$ yum provides */libexpat.so

# yum install libexpat-devel
EDIT : # yum install expat-devel


.

Last edited by knudfl; 10-05-2012 at 04:20 AM.
 
Old 10-04-2012, 12:35 AM   #10
cent_sangeeta
LQ Newbie
 
Registered: Sep 2012
Location: kathmandu,Nepal
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 7

-lexpat = libexpat.so

$ yum provides */libexpat.so

# yum install libexpat-devel


.
Hello Knudfl,
I have downloaded expat-devel-2.0.1-11.el6_2.i686.rpm.

[root@localhost Downloads]# rpm -Uvh expat-devel-2.0.1-11.el6_2.i686.rpm
error: Failed dependencies:
expat = 2.0.1-11.el6_2 is needed by expat-devel-2.0.1-11.el6_2.i686
---------------------------------------------------------------------------

[root@localhost Downloads]# yum install libexpat-devel
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* base: ftp.iitm.ac.in
* extras: ftp.iitm.ac.in
* updates: ftp.iitm.ac.in
http://ftp.iitm.ac.in/centos/6.3/ext...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://virror.hanoilug.org/centos/6....ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://mirrors.vonline.vn/centos/6.3...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://centos.aol.in/6.3/extras/i386...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://mirror-fpt-telecom.fpt.net/ce...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://mirrors.digipower.vn/centos/6...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://mirrors.fibo.vn/centos/6.3/ex...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://mirror.vpshosting.com.hk/pub/...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://centos.communilink.net/6.3/ex...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://centos.01link.hk/6.3/extras/i...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://centos-hn.viettelidc.com.vn/6...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://centos-hcm.viettelidc.com.vn/...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://mirror.sunnyvision.com/centos...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://mirror.vietoss.com/CentOS/6.3...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://ftp.cuhk.edu.hk/pub/Linux/cen...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://mirrors.ispros.com.bd/centos/...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://mirrors.hns.net.in/centos/6.3...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://centos.uhost.hk/6.3/extras/i3...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://centosmirror.go4hosting.in/ce...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
ftp://glug.nith.ac.in/centos/6.3/ext...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://ftp.iitm.ac.in/centos/6.3/upd...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://virror.hanoilug.org/centos/6....ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://centos.aol.in/6.3/updates/i38...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://mirror-fpt-telecom.fpt.net/ce...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://mirrors.digipower.vn/centos/6...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://mirrors.tuna.tsinghua.edu.cn/...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://mirrors.fibo.vn/centos/6.3/up...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://mirror.vpshosting.com.hk/pub/...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://centos.communilink.net/6.3/up...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://mirror.nus.edu.sg/centos/6.3/...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://mirror.neu.edu.cn/centos/6.3/...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://centos-hn.viettelidc.com.vn/6...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://centos-hcm.viettelidc.com.vn/...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://mirror.sunnyvision.com/centos...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://mirror.vietoss.com/CentOS/6.3...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://ftp.cuhk.edu.hk/pub/Linux/cen...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://mirrors.ispros.com.bd/centos/...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://mirrors.hns.net.in/centos/6.3...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://centosmirror.go4hosting.in/ce...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
ftp://ftp.oss.eznetsols.org/linux/ce...ta/repomd.xml: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
Setting up Install Process
No package libexpat-devel available.
Error: Nothing to do

I will try to migrate in unprivileged user as soon as I set all the environment variables.
Thank you,
Sangeeta Maharjan.
 
Old 10-04-2012, 06:45 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 10


It looks like you have no Internet connection ?

Or that something in the network setup in preventing the connection.
 
Old 10-05-2012, 01:25 AM   #12
cent_sangeeta
LQ Newbie
 
Registered: Sep 2012
Location: kathmandu,Nepal
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 10


It looks like you have no Internet connection ?

Or that something in the network setup in preventing the connection.
Actually I have downloaded this package in my home and tried to install in the lab.As we have very slow net connection.
 
Old 10-05-2012, 02:57 AM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 12

Note : Generally, please do not quote complete posts.
That's only making the thread more or less unreadable.


Dependencies for expat-devel : expat > expat-2.0.1-11.el6_2.i686.rpm
> http://mirror.centos.org/centos/6.3/os/i386/Packages/
> http://mirror.centos.org/centos/6.3/...el6_2.i686.rpm

.
 
Old 10-05-2012, 03:22 AM   #14
cent_sangeeta
LQ Newbie
 
Registered: Sep 2012
Location: kathmandu,Nepal
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 12
Dependencies for expat-devel : expat > expat-2.0.1-11.el6_2.i686.rpm
> http://mirror.centos.org/centos/6.3/os/i386/Packages/
> http://mirror.centos.org/centos/6.3/...el6_2.i686.rpm

.
I downloaded expat-2.0.1-11.el6_2.i686.rpm .
then yum install expat
[root@tu-localhost Downloads]# ncargex cpex08 -clean

NCAR Graphics Fortran Example <cpex08>

Copying cpex08.f

Copying cpexcc.f

Compiling and linking...
gfortran -fPIC -fno-second-underscore -fno-range-check -O -o cpex08 cpexcc.f cpex08.f -L/usr/local/lib -lncarg -lncarg_gks -lncarg_c -lX11 -lXext -lcairo -lXrender -lfontconfig -lpixman-1 -lfreetype -lexpat -lpng -lz -lbz2 -lpthread
/usr/bin/ld: cannot find -lexpat
collect2: ld returned 1 exit status

The compile and link failed.

Sangeeta Maharjan
 
Old 10-05-2012, 03:34 AM   #15
cent_sangeeta
LQ Newbie
 
Registered: Sep 2012
Location: kathmandu,Nepal
Posts: 22

Original Poster
Rep: Reputation: Disabled
Knudlf,
I have 2 unprivileged users. In order to run NCL in every unprivileged users, do I have to set all environment variables in all of them or do we have some method to manage it from the superuser(root).

Thank you,
Sangeeta Maharjan
 
  


Reply

Tags
ncar, ncl



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
Installing Shared Libraries miggety Linux - Newbie 9 06-08-2011 10:46 AM
[SOLVED] Unresolvable Dependencies installing ncl and ncl-common rodyz Red Hat 4 04-04-2010 04:05 PM
error while loading shared libraries... installing Midnight Commander Ook Debian 7 05-09-2008 04:57 PM
Problem placing shared libraries iali Linux - General 1 02-01-2006 10:18 PM
[B]Shared libraries problem, help please[/B] turalo Linux - Software 3 12-25-2005 12:22 PM

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

All times are GMT -5. The time now is 06:06 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
Open Source Consulting | Domain Registration