树莓派 make: *** [Makefile:1420: install-am] Error 2

今天给树莓派安装pcre时,出现了这样一个错误:

pi@raspberrypi:/usr/local/lib/pcre-8.13 $ sudo make && make install
make  all-am
make[1]: Entering directory '/usr/local/lib/pcre-8.13'
make[1]: Leaving directory '/usr/local/lib/pcre-8.13'
make[1]: Entering directory '/usr/local/lib/pcre-8.13'
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.0.0.1 /usr/local/lib/libpcre.so.0.0.1
/usr/bin/install: cannot create regular file '/usr/local/lib/libpcre.so.0.0.1': Permission denied
make[1]: *** [Makefile:674: install-libLTLIBRARIES] Error 1
make[1]: Leaving directory '/usr/local/lib/pcre-8.13'
make: *** [Makefile:1420: install-am] Error 2

我发现, 先sudo make,再sudo make install就可以,这说明,sudo make && make install中,执行到make install时已经不再是以系统管理者的身份执行指令了.

你可能感兴趣的:(树莓派,nginx,linux,django)