【发布时间】:2022-01-13 01:50:59
【问题描述】:
我的目标
我想在 Oracle Linux 机器上从源代码编译和安装 nfs-ganesha。
重现步骤
- 使用 Oracle Linux Server 7.4 版
- 从 github 下载 nfs-ganesha:https://github.com/nfs-ganesha/nfs-ganesha
- 按照本指南第 56 到 61 行的步骤进行操作(只是正常的编译和安装):https://github.com/nfs-ganesha/nfs-ganesha/blob/next/src/COMPILING_HOWTO.txt
- 在某些时候,您可能会收到一条错误消息,指出您缺少 userspace-rcu。请
sudo yum install userspace-rcu userspace-rcu-devel修复它。 - 当我运行最后一个命令 (
make install) 时,出现以下错误:
错误
bash-4.2$ make install
[ 3%] Built target MainServices
normal build output...
[100%] Built target fsalmem
Install the project...
-- Install configuration: "Debug"
-- Installing: /etc/ganesha/ganesha.conf
CMake Error at cmake_install.cmake:54 (configure_file):
configure_file Problem configuring file
make: *** [install] Error 1
一些见解
我打开cmake_install.cmake查看失败的地方,这里是代码片段:
我用箭头标记了故障线
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
set(_destfile "/etc/ganesha/ganesha.conf")
if (NOT "$ENV{DESTDIR}" STREQUAL "")
# prepend install root prefix with install-time DESTDIR
set(_destfile "$ENV{DESTDIR}//etc/ganesha/ganesha.conf")
endif ()
if (EXISTS ${_destfile})
message(STATUS "Skipping: ${_destfile} (already exists)")
execute_process(COMMAND "/usr/bin/cmake" -E compare_files
/home/carlhida/Documents/ganesha/src/config_samples/ganesha.conf.example ${_destfile} RESULT_VARIABLE _diff)
if (NOT "${_diff}" STREQUAL "0")
message(STATUS "Installing: ${_destfile}.example")
configure_file(/home/carlhida/Documents/ganesha/src/config_samples/ganesha.conf.example ${_destfile}.example COPYONLY)
endif ()
else ()
message(STATUS "Installing: ${_destfile}")
# install() is not scriptable within install(), and
# configure_file() is the next best thing
-------->>> configure_file(/home/carlhida/Documents/ganesha/src/config_samples/ganesha.conf.example ${_destfile} COPYONLY)
# TODO: create additional install_manifest files?
endif ()
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
我在此函数中发现它会将一个文件复制到另一个文件,但我不确定如何从错误中获取更多信息。我主要担心的是它可能与权限有关,但是当我使用 sudo 时,我得到了:
bash-4.2$ sudo make install
CMake Error: The source directory "/home/carlhida/Documents/ganesha/src" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
make: *** [cmake_check_build_system] Error 1
所以我认为这与此无关。
关键问题
有没有办法知道这些文件到底有什么问题?如果有人知道如何获得这些错误的详细输出,我将不胜感激。
感谢您的帮助!
【问题讨论】:
-
您应该删除 Oracle 标记。该标签指的是 Oracle RDBMS。它没有与源自 RedHat Enterprise Linux 的 Oracl Linux 有任何关系。
-
我猜你的位置是错误的目录,当做'make install'时。 ....请查看我的结果drive.google.com/drive/folders/…
-
错误“配置文件问题”与权限有关。错误“源目录...不存在”是关于您运行
sudo make install的错误目录,如前一位评论者所述。 -
我删除了 oracle 标签,并尝试执行
sudo make install -C /home/carlhida/Documents/buildganesha/。我收到以下错误:make: *** /home/carlhida/Documents/buildganesha/: Permission denied. Stop.似乎它实际上与权限有关。 (我也不能使用su,因为我认为我的虚拟机没有完全的管理员权限。)