查看以下更新 安装过程在 make 步骤开始失败,部分内容显示已成功构建,但最后却出现很长的错误。我已经尝试了以下所有解决方案:checkinstall / make 对我想要安装的程序 razercfg 不起作用。
这是我的 cmake 和 make 的控制台输出:
anonymous@anonymous-AB350M-DS3H:~/razer$ cmake .
-- The C compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
CMake Deprecation Warning at CMakeLists.txt:9 (cmake_policy):
The OLD behavior for policy CMP0005 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for libusb.h
-- Looking for libusb.h - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/anonymous/razer
anonymous@anonymous-AB350M-DS3H:~/razer$ make
Scanning dependencies of target razer
[ 4%] Building C object librazer/CMakeFiles/razer.dir/buttonmapping.o
[ 8%] Building C object librazer/CMakeFiles/razer.dir/profile_emulation.o
[ 12%] Building C object librazer/CMakeFiles/razer.dir/librazer.o
[ 16%] Building C object librazer/CMakeFiles/razer.dir/config.o
[ 20%] Building C object librazer/CMakeFiles/razer.dir/util.o
[ 25%] Building C object librazer/CMakeFiles/razer.dir/synapse.o
[ 29%] Building C object librazer/CMakeFiles/razer.dir/cypress_bootloader.o
[ 33%] Building C object librazer/CMakeFiles/razer.dir/hw_boomslangce.o
[ 37%] Building C object librazer/CMakeFiles/razer.dir/hw_copperhead.o
[ 41%] Building C object librazer/CMakeFiles/razer.dir/hw_deathadder.o
[ 45%] Building C object librazer/CMakeFiles/razer.dir/hw_deathadder2013.o
[ 50%] Building C object librazer/CMakeFiles/razer.dir/hw_deathadder_chroma.o
[ 54%] Building C object librazer/CMakeFiles/razer.dir/hw_krait.o
[ 58%] Building C object librazer/CMakeFiles/razer.dir/hw_lachesis.o
[ 62%] Building C object librazer/CMakeFiles/razer.dir/hw_lachesis5k6.o
[ 66%] Building C object librazer/CMakeFiles/razer.dir/hw_naga.o
[ 70%] Building C object librazer/CMakeFiles/razer.dir/hw_imperator.o
[ 75%] Building C object librazer/CMakeFiles/razer.dir/hw_taipan.o
[ 79%] Building C object librazer/CMakeFiles/razer.dir/hw_mamba_tournament_edition.o
[ 83%] Building C object librazer/CMakeFiles/razer.dir/hw_diamondback_chroma.o
[ 87%] Linking C shared library librazer.so
[ 87%] Built target razer
Scanning dependencies of target razerd
[ 91%] Building C object razerd/CMakeFiles/razerd.dir/razerd.o
[ 95%] Linking C executable razerd
[ 95%] Built target razerd
Scanning dependencies of target pyrazer
[100%] Generating build/stamp
Traceback (most recent call last):
File "/home/anonymous/razer/ui/setup.py", line 3, in <module>
from distutils.core import setup
ModuleNotFoundError: No module named 'distutils.core'
ui/CMakeFiles/pyrazer.dir/build.make:61: recipe for target 'ui/build/stamp' failed
make[2]: *** [ui/build/stamp] Error 1
CMakeFiles/Makefile2:195: recipe for target 'ui/CMakeFiles/pyrazer.dir/all' failed
make[1]: *** [ui/CMakeFiles/pyrazer.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
更新 感谢第一条评论,我安装了 python3-distutils,程序成功通过了 make 命令。但是,安装说明要求使用命令“make install”来完成安装,不幸的是,这会产生新的错误。
anonymous@anonymous-AB350M-DS3H:~/razer$ make install
[ 87%] Built target razer
[ 95%] Built target razerd
[100%] Built target pyrazer
Install the project...
-- Install configuration: ""
-- Installing: /lib/udev/rules.d/80-razer.rules
CMake Error at cmake_install.cmake:49 (file):
file INSTALL cannot copy file "/home/anonymous/razer/udev.rules" to
"/lib/udev/rules.d/80-razer.rules".
Makefile:73: recipe for target 'install' failed
make: *** [install] Error 1