使用“make install”命令时出错

使用“make install”命令时出错

我正在尝试安装 WRF 天气软件(http://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php#STEP7) 需要安装某些库。我可以解压 zip 文件,运行configure,并make正常执行,但当我尝试时make install,出现以下错误:

make  install-recursive
make[1]: Entering directory '/home/jmaloney1985/Desktop/Programs/Build_WRF/LIBRARIES/mpich-3.0.4'
Making install in src/mpl
make[2]: Entering directory '/home/jmaloney1985/Desktop/Programs/Build_WRF/LIBRARIES/mpich-3.0.4/src/mpl'
make[3]: Entering directory '/home/jmaloney1985/Desktop/Programs/Build_WRF/LIBRARIES/mpich-3.0.4/src/mpl'
/usr/bin/mkdir -p '/{path_to_dir}/Build_WRF/LIBRARIES/mpich/lib'
/usr/bin/mkdir: cannot create directory ‘/{path_to_dir}’: Permission denied
make[3]: *** [Makefile:409: install-libLTLIBRARIES] Error 1
make[3]: Leaving directory '/home/jmaloney1985/Desktop/Programs/Build_WRF/LIBRARIES/mpich-3.0.4/src/mpl'
make[2]: *** [Makefile:893: install-am] Error 2
make[2]: Leaving directory '/home/jmaloney1985/Desktop/Programs/Build_WRF/LIBRARIES/mpich-3.0.4/src/mpl'
make[1]: *** [Makefile:23607: install-recursive] Error 1
make[1]: Leaving directory '/home/jmaloney1985/Desktop/Programs/Build_WRF/LIBRARIES/mpich-3.0.4'
make: *** [Makefile:23930: install] Error 2

对此您有何看法?任何意见都非常感谢。

谢谢你!

答案1

make 尝试在这里安装您的代码: 在 /usr/bin/mkdir 中:

此空间不属于您 - 您无权创建或复制某些内容。请改用:

sudo make  install-recursive

sudo 将赋予您 - 并使 - 有权这样做

相关内容