Linux上安装SVN客户端及常见用法

来源:互联网 发布:尚学堂 java架构师 编辑:程序博客网 时间:2024/06/05 08:11

1. 下载subversion-deps-1.4.3.tar.gz 和subversion-1.4.3.tar.gz

http://subversion.tigris.org/downloads/subversion-1.4.3.tar.gz

http://subversion.tigris.org/downloads/subversion-deps-1.4.3.tar.gz


2.解压这两个文件,结果会自动放到同一个文加件subversion-1.4.3

3. cd  subversion-1.4.3/zlib   , 执行./configure, make, make install(需要root权限)

4. cd 到父目录subversion-1.4.3下,./configure, make, make install


常用命令:

可以通过svn --help查看命令

1> checkout:

svn co yourURL

2> add

svn add 文件名

3> commit

svn commit -m path-to-commit, 通常path-to-commit可以为空,即svn commit -m ""

4> update

svn update


安装常见错误:

在64位linux上安装出现:

/usr/bin/ld: /opt/subversion-1.4.3/neon/src/.libs/libneon.a(ne_request.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

解决办法:

在subversion-1.4.3下 ./configure --enable-shared 再重新编译


在64位linux上安装出现:

/usr/bin/ld: /usr/local/lib/libz.a(compress.o): relocation R_X86_64_32 againsa local symbol' can not be used when making a shared object; recompile with -fPIC

解决办法:

cd zlib //进入zlib目录CFLAGS="-O3 -fPIC" ./configure   //使用64位元的方法进行编译makemake installmake clean





原创粉丝点击