从源代码安装 PCRE...导致安装错误!

从源代码安装 PCRE...导致安装错误!

我试图安装 pcre,因为 swig 需要它,而 swig 是安装 gem5 所必需的,无论如何,在成功执行 ./configure 和 make 后,我收到此错误(但有趣的是,上次我安装 swig 时它没有要求 PCRE):

jalal@mona:/research/jalal/gem5-dependencies/pcre$ sudo make install  
[sudo] password for jalal:  make  install-am make[1]: Entering   
directory `/research/jalal/gem5-dependencies/pcre' make[2]: Entering  
directory `/research/jalal/gem5-dependencies/pcre' test -z   
"/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"  /bin/bash   
./libtool   --mode=install /usr/bin/install -c   libpcre.la   
libpcreposix.la libpcrecpp.la '/usr/local/lib' libtool: install:   
/usr/bin/install -c .libs/libpcre.so.1.2.1   
/usr/local/lib/libpcre.so.1.2.1 libtool: install: (cd /usr/local/lib  
&& { ln -s -f libpcre.so.1.2.1 libpcre.so.1 || { rm -f libpcre.so.1   
&& ln -s libpcre.so.1.2.1 libpcre.so.1; }; }) libtool: install: (cd   
/usr/local/lib && { ln -s -f libpcre.so.1.2.1 libpcre.so || { rm -f   
libpcre.so && ln -s libpcre.so.1.2.1 libpcre.so; }; }) libtool:   
install: /usr/bin/install -c .libs/libpcre.lai   
/usr/local/lib/libpcre.la libtool: install: warning: relinking   
`libpcreposix.la' libtool: install: (cd   
/research/jalal/gem5-dependencies/pcre; /bin/bash   
/research/jalal/gem5-dependencies/pcre/libtool  --silent --tag CC   
--mode=relink gcc -fvisibility=hidden -g -O2 -version-info 0:2:0 -o libpcreposix.la -rpath /usr/local/lib libpcreposix_la-pcreposix.lo   
libpcre.la ) mv: cannot move `libpcreposix.so.0.0.2' to   
`libpcreposix.so.0.0.2U': Permission denied libtool: install: error:  
relink `libpcreposix.la' with the above command before installing it  
make[2]: *** [install-libLTLIBRARIES] Error 1 make[2]: Leaving   
directory `/research/jalal/gem5-dependencies/pcre' make[1]: ***   
[install-am] Error 2 make[1]: Leaving directory   
/research/jalal/gem5-dependencies/pcre' make: *** [install] Error 2

答案1

我在安装时遇到了问题http://www.swig.org/download.html尽管我从存储库中安装了 libpcre3 的 PCRE,但我最终还是安装了 swig

sudo apt-get 安装 swig

相关内容