编译文件时make install报错

在一般用户使用时

正常编译文件四步骤:

$ tar -zxvf filename  //解压
$ ./configure  //去解压目录下执行
$ make //编译所有
$ make install  //将编译好的文件进行安装

在执行make install时遇到了下面的错误:

[hadoop@hadoop01 ~/tools/xz-5.0.3]$ make install
Making install in src
make[1]: Entering directory `/home/hadoop/tools/xz-5.0.3/src'
Making install in liblzma
make[2]: Entering directory `/home/hadoop/tools/xz-5.0.3/src/liblzma'
Making install in api
make[3]: Entering directory `/home/hadoop/tools/xz-5.0.3/src/liblzma/api'
make[4]: Entering directory `/home/hadoop/tools/xz-5.0.3/src/liblzma/api'
make[4]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/include" || /bin/mkdir -p "/usr/local/include"
/bin/mkdir -p '/usr/local/include/lzma'
/bin/mkdir: cannot create directory `/usr/local/include/lzma': Permission denied
 /usr/bin/install -c -m 644  lzma/base.h lzma/bcj.h lzma/block.h lzma/check.h lzma/container.h lzma/delta.h lzma/filter.h lzma/hardware.h lzma/index.h lzma/index_hash.h lzma/lzma.h lzma/stream_flags.h lzma/version.h lzma/vli.h '/usr/local/include/lzma'
/usr/bin/install: target `/usr/local/include/lzma' is not a directory
make[4]: *** [install-nobase_includeHEADERS] Error 1
make[4]: Leaving directory `/home/hadoop/tools/xz-5.0.3/src/liblzma/api'
make[3]: *** [install-am] Error 2
make[3]: Leaving directory `/home/hadoop/tools/xz-5.0.3/src/liblzma/api'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/hadoop/tools/xz-5.0.3/src/liblzma'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/hadoop/tools/xz-5.0.3/src'
make: *** [install-recursive] Error 1

刚开始还以为是安装包有问题。又下载几个安装包,结果执行时又遇到了同样错误,
在一番折腾下突然发现make install是用来安装的命令,此时恍然大悟;这其实就是权限问题
只要执行下面命令就可以了

$ sudo make install

都是不细心啊!但是人生不就是一个试错的过程?

你可能感兴趣的:(大数据,HUE)