Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I was trying to install pcre as it was needed by swig which is needed for installing gem5, anyway I am receiving this error after successful ./configure and make (however it's interesting that previous time I was installing swig it didn't ask for 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
/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:
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

share|improve this question

1 Answer 1

I had problem installing it from http://www.swig.org/download.html even though I installed PCRE by libpcre3 from the repository so I ended up installing swig by

sudo apt-get install swig

share|improve this answer
sudo apt-get install swig > Tab Tab > swig swig2.0 –  Qasim Jun 15 '13 at 0:54
sudo apt-get install libpcre3 libpcre3-dev > cyberciti.biz/faq/debian-ubuntu-linux-install-libpcre3-dev –  Qasim Jun 15 '13 at 0:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.