LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   install vim via yum thinks perl is required - I build perl 5.14.2 from source (http://www.linuxquestions.org/questions/linux-general-1/install-vim-via-yum-thinks-perl-is-required-i-build-perl-5-14-2-from-source-942972/)

rubanek 05-02-2012 02:29 PM

install vim via yum thinks perl is required - I build perl 5.14.2 from source
 
I'm trying to install vim-enhanced via yum on CentOS 5.8. I need to run perl 5.14.2 on the system so I installed it via a source build. Now I need to install vim-enhanced (vim) and it says it has a dependency for perl 5.8.8.

When I built perl 5.14.2 from source I made sure I built it with dynamically shared libraries so there is a libperl.so file for vim to use. I also added a /etc/ld.so.conf.d/perl-5.14.2.conf file and ran ldconfig.

What am I missing? How do I tell vim that perl in installed so any more packages that require perl are good?

Thanks,

-rubanek

Kustom42 05-02-2012 03:04 PM

dependency: libperl.so() is where your issue is. Do you have a libperl.so in your /lib/ or /lib64/ directory? If you don't you can create a symlink to where the shared object is stored(since you built from source its in another directory) and it should see that the .so file is there and move past the dependency. The issue here is not that perl is not installed but the location of its library files.

Do a:
Code:

find / -type f -name "*libperl.so*"
If you are having trouble locating it.

rubanek 05-02-2012 03:13 PM

Thanks Kustom42. I figured the libperl.so was the problem... which is why I added the /etc/ld.so.conf.d/perl-5.14.2.conf file:

Code:

[root@jcontent1 ~]# cat /etc/ld.so.conf.d/perl-5.14.2.conf
/usr/local/lib/perl5/5.14.2/x86_64-linux/CORE
[root@jcontent1 ~]# ls -al /usr/local/lib/perl5/5.14.2/x86_64-linux/CORE/libperl.so
-r-xr-xr-x 1 root root 1546021 May  2 13:46 /usr/local/lib/perl5/5.14.2/x86_64-linux/CORE/libperl.so

Should the OS know where libperl.so is since I added that ld config file and ran ldconfig?

rubanek 05-02-2012 04:04 PM

ldconfig -v shows it loading libperl.so via the ld.so.conf.d directory:

Code:

[root@jcontent1 ~]# ldconfig -v | grep perl
/usr/local/lib/perl5/5.14.2/x86_64-linux/CORE:
        libperl.so -> libperl.so

Just to try it I did create a symlink under /lib64 for libperl.so. I also thought it might have something to do with yum cache so I executed `yum clean all` and I `rm -rf /var/cache/yum`. The problem persists.

TobiSGD 05-02-2012 06:42 PM

The problem is that yum (or rpm) has no package perl in its libraries, it doesn't care for the files on your system. This is why the proper way when installing software from source is to first build a package from it and then install the package.
Of course you can force rpm to install the vim package anyways, but that will break the dependency chain (at least it does the same when forcing dpkg on Debian system, not sure about rpm/yum).
So to solve your problem, build a proper package of Perl and install it. Then you should have no problems with vim.


All times are GMT -5. The time now is 11:27 PM.