svn做爲集中式版本管理軟件,受到不少大項目的青睞,可是在如今git王道的時代,還用svn就顯得不是那麼極客。html
奈何公司軟件版本管理須要使用svn,因而就要考慮在Ubuntu系統中安裝svn。python
通常的,在Ubuntu系統命令行中,輸入 svn ,即會跳出安裝指令。以下:linux
root@ubuntu:~# svn 程序「svn」還沒有安裝。 您可使用如下命令安裝: apt-get install subversion # 而後就靜精地等待安裝完成 root@ubuntu:~# svn help # 顯示安裝內容
更奈何,公司網絡限制 apt-get 的方式安裝軟件,因而有了這篇博文。git
本文參考了一些網上的安裝示例,走了一些彎路,纔有瞭如今的一鍵安裝腳本。感謝其餘博主的辛苦努力,後面再附上參考地址。redis
言歸正傳,下面就介紹一下以源碼的方式如何安裝svn。sql
在研究了其餘人的安裝步驟後,總結:編譯subversion,須要如下安裝包:apache
下載並解壓合集包(網盤地址:網盤 提取碼:5xc9 ),運行 install.sh ,等待解壓、配置而且編譯源碼包。大約20分鐘安裝完畢,腳本完成。輸入 svn --version 檢測是否安裝成功。ubuntu
root@ubuntu:桌面# svn --version svn,版本 1.12.0 (r1857323) 編譯於 Jul 15 2019,11:54:36 在 x86_64-unknown-linux-gnu Copyright (C) 2019 The Apache Software Foundation. This software consists of contributions made by many people; see the NOTICE file for more information. Subversion is open source software, see http://subversion.apache.org/ 可以使用如下的版本庫訪問模塊: * ra_svn : 使用 svn 網絡協議訪問版本庫的模塊。 - 處理「svn」方案 * ra_local : 訪問本地磁盤的版本庫模塊。 - 處理「file」方案 * ra_serf : Module for accessing a repository via WebDAV protocol using serf. - using serf 1.3.9 (compiled with 1.3.9) - 處理「http」方案 - 處理「https」方案 The following authentication credential caches are available: * GPG-Agent root@ubuntu:桌面#
若是沒有下載合集包,能夠編寫此腳本會自行 wget 下載所須要的包(注意:複製粘貼操做請在linux系統下完成,由於linux系統和windows系統的換行符號不一樣,linux沒法識別win系統中\r換行符,會報程序錯誤。)windows
1 # wget http://www.apache.org/dist/apr/apr-1.6.5.tar.bz2 2 tar xjf apr-1.6.5.tar.bz2 3 cd apr-1.6.5 4 ./configure --prefix=/usr/local/apache 5 make && sudo make install 6 7 cd .. 8 # wget http://distfiles.macports.org/expat/expat-2.2.7.tar.bz2 9 tar xjf expat-2.2.7.tar.bz2 10 cd expat-2.2.7 11 ./configure 12 make && sudo make install 13 14 cd .. 15 # wget http://www.apache.org/dist/apr/apr-util-1.6.1.tar.bz2 16 tar xjf apr-util-1.6.1.tar.bz2 17 cd apr-util-1.6.1 18 ./configure --prefix=/usr/local/apache --with-apr=/usr/local/apache 19 make && sudo make install 20 21 cd .. 22 # wget https://nchc.dl.sourceforge.net/project/libpng/zlib/1.2.11/zlib-1.2.11.tar.gz 23 tar xzf zlib-1.2.11.tar.gz 24 cd zlib-1.2.11 25 ./configure 26 make && sudo make install 27 28 cd .. 29 # wget http://prdownloads.sourceforge.net/scons/scons-3.0.4.tar.gz 30 tar xzf scons-3.0.4.tar.gz 31 cd scons-3.0.4 32 sudo python setup.py install 33 34 cd .. 35 # wget http://distfiles.macports.org/openssl/openssl-1.0.2s.tar.gz 36 tar xzf openssl-1.0.2s.tar.gz 37 cd openssl-1.0.2s 38 ./config -fPIC --prefix=/usr/local/openssl enable-shared 39 make && sudo make install 40 41 cd .. 42 # wget https://archive.apache.org/dist/serf/serf-1.3.9.tar.bz2 43 tar xjf serf-1.3.9.tar.bz2 44 cd serf-1.3.9 45 scons PREFIX=/usr/local/serf APR=/usr/local/apache APU=/usr/local/apache OPENSSL=/usr/local/openssl 46 sudo scons install 47 sudo ln -sf /usr/local/serf/include/serf-1/serf_bucket_util.h /usr/local/include/serf_bucket_util.h 48 sudo ln -sf /usr/local/serf/include/serf-1/serf_bucket_types.h /usr/local/include/serf_bucket_types.h 49 sudo ln -sf /usr/local/serf/include/serf-1/serf.h /usr/local/include/serf.h 50 51 sudo ln -sf /usr/local/serf/lib/libserf-1.so.1.3.0 /usr/local/lib/libserf-1.so 52 sudo ln -sf /usr/local/serf/lib/libserf-1.so.1.3.0 /usr/local/lib/libserf-1.so.1 53 sudo ldconfig 54 55 56 cd .. 57 # wget https://www.sqlite.org/2019/sqlite-amalgamation-3290000.zip 58 unzip sqlite-amalgamation-3290000.zip 59 mv sqlite-amalgamation-3290000 sqlite-amalgamation 60 61 # wget http://distfiles.macports.org/subversion/subversion-1.12.0.tar.bz2 62 tar xjf subversion-1.12.0.tar.bz2 63 mv sqlite-amalgamation subversion-1.12.0 64 cd subversion-1.12.0 65 ./configure --prefix=/usr/local/svn --with-apr=/usr/local/apache --with-apr-util=/usr/local/apache --with-zlib=/usr/local/zlib --with-serf=/usr/local/serf --with-lz4=internal --with-utf8proc=internal 66 make && sudo make install 67 sudo ln -sf /usr/local/svn/bin/* /usr/bin 68 svn help 69 70 # wget http://ftp.yz.yamagata-u.ac.jp/pub/eclipse/technology/subversive/3.0/builds/Subversive-3.0.5.I20160701-1700.zip
# 爲svn的bin文件建立軟連接
sudo ln -sf /usr/local/svn/bin/* /usr/bin
# 因爲subversion須要使用serf的共享庫,須要把共享庫放在 /usr/local/lib 中 sudo ln -sf /usr/local/serf/lib/libserf-1.so.1.3.0 /usr/local/lib/libserf-1.so
sudo ln -sf /usr/local/serf/lib/libserf-1.so.1.3.0 /usr/local/lib/libserf-1.so.1
# 生效共享庫配置 (重要)
sudo ldconfig
subclipse是eclipse下的第三方svn插件。首先下載subclipse插件包 site-1.10.13-1.9.x.zip ,地址 (集成包中也有)bash
# 或者直接 wget 下載
wget http://subclipse.tigris.org/files/documents/906/49486/site-1.10.13-1.9.x.zip
打開eclipse CDT,點擊 Help -> Install New Software
選擇 Add 添加壓縮包
壓縮包選擇以下:
選擇須要安裝的項目:(Graph不選,其餘都選擇)
檢測條件是否知足:
執行下一步,接受許可,
點擊 Finish 完成安裝,中途彈出彈框點擊OK,所有安裝完成後 Restart 就行。
重啓後,選擇視窗 ,中文名稱爲 SVN資源庫研究,英文是 SVN Repositry Exploring,證實安裝成功。
TODO: 使用方法後面博文
1 op/subversion/apr-util-1.6.1/include -I/home/yq/Desktop/subversion/apr-util-1.6.1/include/private -I/usr/local/apache/include/apr-1 -o xml/apr_xml.lo -c xml/apr_xml.c && touch xml/apr_xml.lo 2 xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory 3 compilation terminated. 4 make[1]: *** [xml/apr_xml.lo] Error 1 5 make[1]: Leaving directory `/home/yq/Desktop/subversion/apr-util-1.6.1' 6 make: *** [all-recursive] Error 1 7 yq@ubuntu:~/Desktop/subversion/apr-util-1.6.1$
須要在編譯 apr-util 以前先安裝 expat 包,用於xml文件的解析。
./configrue 是linux系統下常見的源碼配置程序,配置後能夠生成編譯規則文件 makefile ,而linux系統較之於windows系統不一樣之處之一是軟件的安裝位置管理不夠直觀,
因此通常的,配置makefile時候,有個選項 --prefix=WILL_INSTALL_PATH ,
通常指定 WILL_INSTALL_PATH 爲 usr/local ,在PATH系統環境中,方便快捷鍵調用。
1 root@ubuntu:apr-1.6.5# ./configure help 2 configure: WARNING: you should use --build, --host, --target 3 checking build system type... Invalid configuration `help': machine `help' not recognized 4 configure: error: /bin/bash build/config.sub help failed 5 root@ubuntu:apr-1.6.5# ./configure --help 6 `configure' configures this package to adapt to many kinds of systems. 7 8 Usage: ./configure [OPTION]... [VAR=VALUE]... 9 10 To assign environment variables (e.g., CC, CFLAGS...), specify them as 11 VAR=VALUE. See below for descriptions of some of the useful variables. 12 13 Defaults for the options are specified in brackets. 14 15 Configuration: 16 -h, --help display this help and exit 17 --help=short display options specific to this package 18 --help=recursive display the short help of all the included packages 19 -V, --version display version information and exit 20 -q, --quiet, --silent do not print `checking ...' messages 21 --cache-file=FILE cache test results in FILE [disabled] 22 -C, --config-cache alias for `--cache-file=config.cache' 23 -n, --no-create do not create output files 24 --srcdir=DIR find the sources in DIR [configure dir or `..'] 25 26 Installation directories: 27 --prefix=PREFIX install architecture-independent files in PREFIX 28 [/usr/local] 29 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 30 [PREFIX] 31 32 By default, `make install' will install all the files in 33 `/usr/local/bin', `/usr/local/lib' etc. You can specify 34 an installation prefix other than `/usr/local' using `--prefix', 35 for instance `--prefix=$HOME'. 36 37 For better control, use the options below. 38 39 Fine tuning of the installation directories: 40 --bindir=DIR user executables [EPREFIX/bin] 41 --sbindir=DIR system admin executables [EPREFIX/sbin] 42 --libexecdir=DIR program executables [EPREFIX/libexec] 43 --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 44 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 45 --localstatedir=DIR modifiable single-machine data [PREFIX/var] 46 --libdir=DIR object code libraries [EPREFIX/lib] 47 --includedir=DIR C header files [PREFIX/include] 48 --oldincludedir=DIR C header files for non-gcc [/usr/include] 49 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] 50 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 51 --infodir=DIR info documentation [DATAROOTDIR/info] 52 --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 53 --mandir=DIR man documentation [DATAROOTDIR/man] 54 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] 55 --htmldir=DIR html documentation [DOCDIR] 56 --dvidir=DIR dvi documentation [DOCDIR] 57 --pdfdir=DIR pdf documentation [DOCDIR] 58 --psdir=DIR ps documentation [DOCDIR] 59 60 System types: 61 --build=BUILD configure for building on BUILD [guessed] 62 --host=HOST cross-compile to build programs to run on HOST [BUILD] 63 --target=TARGET configure for building compilers for TARGET [HOST] 64 65 Optional Features: 66 --disable-option-checking ignore unrecognized --enable/--with options 67 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 68 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 69 --enable-layout=LAYOUT 70 --enable-experimental-libtool Use experimental custom libtool 71 --enable-shared[=PKGS] build shared libraries [default=yes] 72 --enable-static[=PKGS] build static libraries [default=yes] 73 --enable-fast-install[=PKGS] 74 optimize for fast installation [default=yes] 75 --disable-libtool-lock avoid locking (might break parallel builds) 76 --enable-debug Turn on debugging and compile time warnings 77 --enable-maintainer-mode Turn on debugging and compile time warnings 78 --enable-profile Turn on profiling for the build (GCC) 79 --enable-pool-debug[=yes|no|verbose|verbose-alloc|lifetime|owner|all] Turn on pools debugging 80 --enable-malloc-debug Switch on malloc_debug for BeOS 81 --disable-lfs Disable large file support on 32-bit platforms 82 --enable-nonportable-atomics Use optimized atomic code which may produce nonportable binaries 83 --enable-threads Enable threading support in APR. 84 --enable-posix-shm Use POSIX shared memory (shm_open) if available 85 --enable-allocator-uses-mmap Use mmap in apr_allocator instead of malloc 86 --enable-allocator-guard-pages Use guard pages in apr_allocator 87 (implies --enable-allocator-uses-mmap) 88 --enable-pool-concurrency-check Check for concurrent usage of memory pools 89 --disable-dso Disable DSO support 90 --enable-other-child Enable reliable child processes 91 --disable-ipv6 Disable IPv6 support in APR. 92 93 Optional Packages: 94 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 95 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 96 --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use 97 both] 98 --with-aix-soname=aix|svr4|both 99 shared library versioning (aka "SONAME") variant to 100 provide on AIX, [default=aix]. 101 --with-gnu-ld assume the C compiler uses GNU ld [default=no] 102 --with-sysroot[=DIR] Search for dependent libraries within DIR (or the 103 compiler's sysroot if not specified). 104 --with-installbuilddir=DIR location to store APR build files 105 --without-libtool avoid using libtool to link the library 106 --with-efence[=DIR] path to Electric Fence installation 107 --with-valgrind[=DIR] Enable code to teach valgrind about apr pools 108 (optionally: set path to valgrind headers) 109 --with-sendfile Override decision to use sendfile 110 --with-egd[=DIR] use EGD-compatible socket 111 --with-devrandom[=DEV] use /dev/random or compatible [searches by default] 112 113 Some influential environment variables: 114 CC C compiler command 115 CFLAGS C compiler flags 116 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a 117 nonstandard directory <lib dir> 118 LIBS libraries to pass to the linker, e.g. -l<library> 119 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if 120 you have headers in a nonstandard directory <include dir> 121 CPP C preprocessor 122 LT_SYS_LIBRARY_PATH 123 User-defined run-time library search path. 124 125 Use these variables to override the choices made by `configure' or to help 126 it to find libraries and programs with nonstandard names/locations. 127 128 Report bugs to the package provider.
./configrue --prefix=/usr/local/apache # 安裝apr-1.6.5到 /usr/local/apache
注意:也有例外的狀況,好比此腳本中在安裝expat包的時候不能指定路徑,不然會報libexpat.h找不到,可能安裝的庫不在系統環境中致使異常,從新configure一下,取消默認路徑,再次編譯和安裝後正常。
進一步分析,爲什麼安裝指定的路徑下,就不能被其餘軟件調用到。分析以下:
1 xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory # 安裝expat 到 /usr/local/expat 以後,再make apr-util 依然報錯,找不到expat
2 compilation terminated.
3 make[1]: *** [xml/apr_xml.lo] Error 1
4 make[1]: Leaving directory `/home/yq/Desktop/subversion/apr-util-1.6.1'
5 make: *** [all-recursive] Error 1
6 yq@ubuntu:~/Desktop/subversion/apr-util-1.6.1$ find /usr -name expat.h # 進一步查找expat.h 發現已經安裝成功
7 /usr/local/arm-4.8.4/include/expat.h 8 /usr/local/arm-4.8.4/arm-buildroot-linux-gnueabihf/sysroot/usr/include/expat.h 9 /usr/local/expat/include/expat.h # 安裝成功 地址在 /usr/local/expat/include/expat.h
10 yq@ubuntu:~/Desktop/subversion/apr-util-1.6.1$ ls /usr/local/include/
11 yq@ubuntu:~/Desktop/subversion/apr-util-1.6.1$ ls /usr/local/expat/include/
12 expat_config.h expat_external.h expat.h # expat存在的頭文件
13 yq@ubuntu:~/Desktop/subversion/apr-util-1.6.1$ sudo ln -s /usr/local/expat/include/expat*.h /usr/local/include/ # 注意:處理方式,將expat安裝後的頭文件,建立一組軟鏈接到系統環境中的頭文件路徑 /usr/local/include
14 yq@ubuntu:~/Desktop/subversion/apr-util-1.6.1$ ls /usr/local/include/
15 expat_config.h expat_external.h expat.h
16 yq@ubuntu:~/Desktop/subversion/apr-util-1.6.1$ make # 再次編譯 apr-util 成功
17 make[1]: Entering directory `/home/yq/Desktop/subversion/apr-util-1.6.1'
22 /bin/bash /usr/local/apache/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/home/yq/Desktop/subversion/apr-util-1.6.1/include -I/home/yq/Desktop/subversion/apr-util-1.6.1/include/private -I/usr/local/apache/include/apr-1 -o xml/apr_xml.lo -c xml/apr_xml.c && touch xml/apr_xml.lo
23 /bin/bash /usr/local/apache/build-1/libtool --silent --mode=link gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/home/yq/Desktop/subversion/apr-util-1.6.1/include -I/home/yq/Desktop/subversion/apr-util-1.6.1/include/private -I/usr/local/apache/include/apr-1 -version-info 6:1:6 -o libaprutil-1.la -rpath /usr/local/apache/lib buckets/apr_brigade.lo buckets/apr_buckets.lo buckets/apr_buckets_alloc.lo buckets/apr_buckets_eos.lo buckets/apr_buckets_file.lo buckets/apr_buckets_flush.lo buckets/apr_buckets_heap.lo buckets/apr_buckets_mmap.lo buckets/apr_buckets_pipe.lo buckets/apr_buckets_pool.lo buckets/apr_buckets_refcount.lo buckets/apr_buckets_simple.lo buckets/apr_buckets_socket.lo crypto/apr_crypto.lo crypto/apr_md4.lo crypto/apr_md5.lo crypto/apr_passwd.lo crypto/apr_sha1.lo crypto/apr_siphash.lo crypto/crypt_blowfish.lo crypto/getuuid.lo crypto/uuid.lo dbd/apr_dbd.lo dbm/apr_dbm.lo dbm/apr_dbm_sdbm.lo dbm/sdbm/sdbm.lo dbm/sdbm/sdbm_hash.lo dbm/sdbm/sdbm_lock.lo dbm/sdbm/sdbm_pair.lo encoding/apr_base64.lo hooks/apr_hooks.lo ldap/apr_ldap_stub.lo ldap/apr_ldap_url.lo memcache/apr_memcache.lo misc/apr_date.lo misc/apr_queue.lo misc/apr_reslist.lo misc/apr_rmm.lo misc/apr_thread_pool.lo misc/apu_dso.lo misc/apu_version.lo redis/apr_redis.lo strmatch/apr_strmatch.lo uri/apr_uri.lo xlate/xlate.lo xml/apr_xml.lo -lrt -lcrypt -lpthread -ldl /usr/local/apache/lib/libapr-1.la -lrt -lcrypt -lpthread -ldl
24 gawk -f /usr/local/apache/build-1/make_exports.awk /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_anylock.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_base64.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_buckets.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_crypto.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_date.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_dbd.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_dbm.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_hooks.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_ldap_init.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_ldap_option.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_ldap_rebind.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_ldap_url.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_md4.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_md5.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_memcache.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_optional.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_optional_hooks.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_queue.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_redis.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_reslist.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_rmm.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_sdbm.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_sha1.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_siphash.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_strmatch.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_thread_pool.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_uri.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_uuid.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_xlate.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_xml.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apu_errno.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apu_version.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/private/apr_crypto_internal.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/private/apr_dbd_internal.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/private/apr_dbd_odbc_v2.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/private/apr_dbm_private.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/private/apu_internal.h > exports.c
25 gawk -f /usr/local/apache/build-1/make_var_export.awk /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_anylock.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_base64.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_buckets.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_crypto.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_date.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_dbd.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_dbm.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_hooks.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_ldap_init.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_ldap_option.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_ldap_rebind.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_ldap_url.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_md4.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_md5.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_memcache.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_optional.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_optional_hooks.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_queue.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_redis.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_reslist.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_rmm.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_sdbm.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_sha1.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_siphash.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_strmatch.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_thread_pool.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_uri.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_uuid.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_xlate.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apr_xml.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apu_errno.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/apu_version.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/private/apr_crypto_internal.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/private/apr_dbd_internal.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/private/apr_dbd_odbc_v2.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/private/apr_dbm_private.h /home/yq/Desktop/subversion/apr-util-1.6.1/include/private/apu_internal.h > export_vars.c
26 gcc -E -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/home/yq/Desktop/subversion/apr-util-1.6.1/include -I/home/yq/Desktop/subversion/apr-util-1.6.1/include/private -I/usr/local/apache/include/apr-1 exports.c | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$/\1/' >> aprutil.exp
27 gcc -E -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/home/yq/Desktop/subversion/apr-util-1.6.1/include -I/home/yq/Desktop/subversion/apr-util-1.6.1/include/private -I/usr/local/apache/include/apr-1 export_vars.c | sed -e 's/^\#[^!]*//' | sed -e '/^$/d' >> aprutil.exp
28 sed 's,^\(location=\).*$,\1installed,' < apu-1-config > apu-config.out
29 make[1]: Leaving directory `/home/yq/Desktop/subversion/apr-util-1.6.1'
30 yq@ubuntu:~/Desktop/subversion/apr-util-1.6.1$ make | grep Error
31 yq@ubuntu:~/Desktop/subversion/apr-util-1.6.1$ make | grep make
32 make[1]: Entering directory `/home/yq/Desktop/subversion/apr-util-1.6.1'
33 make[1]: Nothing to be done for `local-all'.
34 make[1]: Leaving directory `/home/yq/Desktop/subversion/apr-util-1.6.1'
35 yq@ubuntu:~/Desktop/subversion/apr-util-1.6.1$
綜上分析:對於不能被引入頭文件的Error,嘗試將頭文件建立爲軟鏈接放置在系統環境路徑中,以便編譯全局調用。(同2.4)
參考了博文,有博友評論是 subversion 僅支持 apr-1.6.5 版本如下的安裝,不支持最新的1.7.0。更換了apr-1.6.5版本後,配置正常。
subversion/libsvn_ra_serf/blame.c:25:18: 致命錯誤: serf.h:沒有那個文件或目錄 編譯中斷。 make: *** [subversion/libsvn_ra_serf/blame.lo] 錯誤 1 root@ubuntu:subversion-1.12.0#
考慮是由於安裝serf後,文件並不在系統環境變量中,將 serf.h 相關的頭文件,連接到系統環境中,編譯正常。操做以下:
# 建立serf頭文件的超連接到 /usr/local/include
ln -s /usr/local/serf/include/serf-1/serf*.h /usr/local/include/
[1]. configure: error: failed to recognize APR_INT64_T_FMT on this platform-愛開源
[2]. [OE-core] [PATCH 08/10] subversion: Add -P to CPPFLAGS
[3]. Ubuntu 源碼方式安裝Subversion - wwl1991 - 博客園