LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problem in installing CISL's NCL due to shared libraries: libbz2.so.1.0 (https://www.linuxquestions.org/questions/linux-software-2/problem-in-installing-cisls-ncl-due-to-shared-libraries-libbz2-so-1-0-a-4175430211/)

cent_sangeeta 10-03-2012 12:55 AM

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

knudfl 10-03-2012 01:05 AM

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


.

cent_sangeeta 10-03-2012 01:40 AM

Quote:

Originally Posted by knudfl (Post 4795677)
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

cent_sangeeta 10-03-2012 01:53 AM

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

knudfl 10-03-2012 02:48 AM

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

.

cent_sangeeta 10-03-2012 03:21 AM

Quote:

Originally Posted by knudfl (Post 4795757)
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

cent_sangeeta 10-03-2012 05:07 AM

Quote:

Originally Posted by cent_sangeeta (Post 4795783)
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

knudfl 10-03-2012 05:15 AM

# 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.

.

knudfl 10-03-2012 05:19 AM

# 7
Quote:

/usr/bin/ld: cannot find -lexpat
-lexpat = libexpat.so

$ yum provides */libexpat.so

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


.

cent_sangeeta 10-04-2012 12:35 AM

Quote:

Originally Posted by knudfl (Post 4795855)
# 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.

knudfl 10-04-2012 06:45 AM

# 10


It looks like you have no Internet connection ?

Or that something in the network setup in preventing the connection.

cent_sangeeta 10-05-2012 01:25 AM

Quote:

Originally Posted by knudfl (Post 4796971)
# 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.

knudfl 10-05-2012 02:57 AM

# 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

.

cent_sangeeta 10-05-2012 03:22 AM

Quote:

Originally Posted by knudfl (Post 4797839)
# 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

cent_sangeeta 10-05-2012 03:34 AM

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


All times are GMT -5. The time now is 09:50 PM.