我正在尝试运行一个transpiler项目,该项目将阿尔法代码转换为一个可靠的智能契约,但在运行最终命令make以生成一个将alfa转换为solidity的可执行文件之后,我会得到以下错误:
CMake Error at _deps/googletest-build/googlemock/cmake_install.cmake:46 (file):
file INSTALL cannot set permissions on "/usr/local/include": Operation not
permitted.
Call Stack (most recent call first):
_deps/googletest-build/cmake_install.cmake:47 (include)
runtime/cmake_install.cmake:47 (include)
cmake_install.cmake:47 (include)虽然我已经将/usr/local/include的权限设置为777,但在运行命令后仍然会得到错误。
我尝试运行sudo make而不是make,但随后我得到了与antlr4 4-运行时库相关的其他错误,即以下内容,但它没有答案:some includes are broken after antlr4 c++ runtime setup on linux。
任何帮助都是非常感谢的,谢谢。
以下是错误的完整跟踪:
Consolidate compiler generated dependencies of target antlr4_tests
make[5]: Leaving directory '/home/ubuntu/new/transpiler/build6/antlr4cpp-prefix/src/antlr4cpp-build'
make -f runtime/CMakeFiles/antlr4_tests.dir/build.make runtime/CMakeFiles/antlr4_tests.dir/build
make[5]: Entering directory '/home/ubuntu/new/transpiler/build6/antlr4cpp-prefix/src/antlr4cpp-build'
make[5]: Nothing to be done for '_deps/googletest-build/googlemock/CMakeFiles/gmock_main.dir/build'.
make[5]: Leaving directory '/home/ubuntu/new/transpiler/build6/antlr4cpp-prefix/src/antlr4cpp-build'
make[5]: Entering directory '/home/ubuntu/new/transpiler/build6/antlr4cpp-prefix/src/antlr4cpp-build'
make[5]: Nothing to be done for 'runtime/CMakeFiles/antlr4_tests.dir/build'.
make[5]: Leaving directory '/home/ubuntu/new/transpiler/build6/antlr4cpp-prefix/src/antlr4cpp-build'
[ 99%] Built target gmock_main
[100%] Built target antlr4_tests
make[4]: Leaving directory '/home/ubuntu/new/transpiler/build6/antlr4cpp-prefix/src/antlr4cpp-build'
/usr/bin/cmake -E cmake_progress_start /home/ubuntu/new/transpiler/build6/antlr4cpp-prefix/src/antlr4cpp-build/CMakeFiles 0
make -f CMakeFiles/Makefile2 preinstall
make[4]: Entering directory '/home/ubuntu/new/transpiler/build6/antlr4cpp-prefix/src/antlr4cpp-build'
make[4]: Nothing to be done for 'preinstall'.
make[4]: Leaving directory '/home/ubuntu/new/transpiler/build6/antlr4cpp-prefix/src/antlr4cpp-build'
Install the project...
/usr/bin/cmake -P cmake_install.cmake
-- Install configuration: "Release"
-- Up-to-date: /usr/local/include
CMake Error at _deps/googletest-build/googlemock/cmake_install.cmake:46 (file):
file INSTALL cannot set permissions on "/usr/local/include": Operation not
permitted.
Call Stack (most recent call first):
_deps/googletest-build/cmake_install.cmake:47 (include)
runtime/cmake_install.cmake:47 (include)
cmake_install.cmake:47 (include)
make[3]: *** [Makefile:130: install] Error 1
make[3]: Leaving directory '/home/ubuntu/new/transpiler/build6/antlr4cpp-prefix/src/antlr4cpp-build'
make[2]: *** [CMakeFiles/antlr4cpp.dir/build.make:102: antlr4cpp-prefix/src/antlr4cpp-stamp/antlr4cpp-install] Error 2
make[2]: Leaving directory '/home/ubuntu/new/transpiler/build6'
make[1]: *** [CMakeFiles/Makefile2:86: CMakeFiles/antlr4cpp.dir/all] Error 2
make[1]: Leaving directory '/home/ubuntu/new/transpiler/build6'
make: *** [Makefile:91: all] Error 2发布于 2022-08-08 21:19:35
错误是它希望设置/usr/local/include本身的权限,而不是向/usr/local/include添加内容。您所授予的权限并不重要,只有文件(或目录)的所有者才能更改该文件(或目录)的权限。
https://stackoverflow.com/questions/73283823
复制相似问题