简体   繁体   中英

Install latest SVN 1.9.2 on CentOS - libserf-1.so.1 is needed error

CentOS 6.5 Subversion rpm: http://opensource.wandisco.com/centos/6/svn-1.9/RPMS/x86_64/subversion-1.9.2-1.x86_64.rpm

Ran rpm -ivh on the above file and getting the following error. What should I install (yum install ??) to get rid of the following error.

$ rpm -ivh subversion-1.9.2-1.x86_64.rpm
warning: subversion-1.9.2-1.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 3bbf077a: NOKEY
error: Failed dependencies:
        libserf-1.so.1()(64bit) is needed by subversion-1.9.2-1.x86_64

I found that if I install from the source .tar.gz files, then it's a hassle to install 2 different versions of svn on a machine as it requires various pre-requisite yum modules to be installed first and then make commands to get it to work and I'm using Ansible.

The easiest way is to run "sudo yum install subversion" but it's not giving me the latest 1.9.2 version. Using this way, I'm getting 1.6.11 or close.

Is there any list which shows the complete list of tools required to be installed in simple steps (possibly multiple versions). ie

sudo yum -y install pre-requisite-tools-abc xyz giga1
make || make prefix=/home/user/tools/subversion-1.9.2
make || make prefix=/home/user/tools/subversion-1.9.2 install
svn --version

To properly install subversion 1.9 from Wandisco, you should do the following:

Create a new repo file /etc/yum.repos.d/wandisco-svn.repo with following content:

[WandiscoSVN]
name=Wandisco SVN Repo
baseurl=http://opensource.wandisco.com/centos/$releasever/svn-1.9/RPMS/$basearch/
enabled=1
gpgcheck=0

Then install svn with following command:

yum --disablerepo="*" --enablerepo="WandiscoSVN" install subversion

您可以使用安装构建依赖项

   yum-builddep foo.src.rpm

I had same issue on Cent OS7. Seems like i did not uninstalled subversion-libs version that comes with CentOS by default. After removing it, i was able to install latest subversion

 yum remove subversion-libs
Loaded plugins: fastestmirror, langpacks
Resolving Dependencies
--> Running transaction check
---> Package subversion-libs.x86_64 0:1.7.14-10.el7 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================
 Package                              Arch                        Version                               Repository                      Size
=============================================================================================================================================
Removing:
 subversion-libs                      x86_64                      1.7.14-10.el7                         @anaconda                      2.5 M

Transaction Summary
=============================================================================================================================================
Remove  1 Package

Installed size: 2.5 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : subversion-libs-1.7.14-10.el7.x86_64                                                                                      1/1
  Verifying  : subversion-libs-1.7.14-10.el7.x86_64                                                                                      1/1

Removed:
  subversion-libs.x86_64 0:1.7.14-10.el7

Complete!



yum install subversion-1.9.4-1.x86_64.rpm
Loaded plugins: fastestmirror, langpacks
Examining subversion-1.9.4-1.x86_64.rpm: subversion-1.9.4-1.x86_64
Marking subversion-1.9.4-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package subversion.x86_64 0:1.9.4-1 will be installed
--> Processing Dependency: libserf-1.so.0()(64bit) for package: subversion-1.9.4-1.x86_64
Loading mirror speeds from cached hostfile
 * base: cosmos.illinois.edu
 * extras: www.gtlib.gatech.edu
 * updates: mirror.teklinks.com
--> Running transaction check
---> Package libserf.x86_64 0:1.3.7-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================
 Package                       Arch                      Version                         Rep
============================================================================================
Installing:
 subversion                    x86_64                    1.9.4-1                         /su
Installing for dependencies:
 libserf                       x86_64                    1.3.7-1.el7                     Wan

Transaction Summary
============================================================================================
Install  1 Package (+1 Dependent package)

Total size: 9.0 M
Installed size: 9.1 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libserf-1.3.7-1.el7.x86_64
  Installing : subversion-1.9.4-1.x86_64
  Verifying  : subversion-1.9.4-1.x86_64
  Verifying  : libserf-1.3.7-1.el7.x86_64

Installed:
  subversion.x86_64 0:1.9.4-1

Dependency Installed:
  libserf.x86_64 0:1.3.7-1.el7

Complete!

So the real issue here is that you're missing the serf dependency. You'll encounter this same error on other versions (1.9.9 for example) as well as other OS's (RHEL6 for example). Aleksandar Pavić's answer works great if your server has internet access because you're adding the OpenSource Wandisco RPMs as a repository and letting yum go find what it needs. I did test this on my CentOS 7.2 and it worked wonderfully. A simpler work around that also works if you don't have internet connectivity to get out to Wandisco is to install the serf dependency first, which is what I had to do because my RHEL6 SVN is internal only and won't route to Wandisco.

In the case of installing 1.9.9 on RHEL6, that means doing a yum install on serf-1.3.7-1.x86_64.rpm and then yum install subversion-1.9.9-1.x86_64.rpm where those RPMs came from http://opensource.wandisco.com/rhel/6Server/svn-1.9/RPMS/x86_64/?C=M;O=A That's what worked for me.

$ rpm -qlp serf-1.3.7-1.x86_64.rpm
/usr/lib64/libserf-1.so
/usr/lib64/libserf-1.so.1
/usr/lib64/libserf-1.so.1.3.0

For CentOS7, I believe you're looking at libserf-1.3.8-1.el7.x86_64.rpm from http://opensource.wandisco.com/centos/7/svn-1.9/RPMS/x86_64/?C=M;O=A and then whichever version of 1.9 you're wanting.

Hope that helps.

you can use below command to install svn 1.9 version on amazon linux 2 or centos7.

rpm -ivh http://opensource.wandisco.com/centos/7/svn-1.9/RPMS/x86_64/subversion-1.9.12-1.x86_64.rpm

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM