我的目标是改变我的鼠标 DPI。因此,任何不那么令人沮丧的解决方案也都受欢迎。
我已经搜索并阅读了有关其他主题razercfg
以及许多其他试图弄清楚如何避免这些错误的内容,但我对 Linux 还不熟悉,甚至我所阅读的答案也让我更加困惑。
我正在尝试安装razercfg
,可以在这里找到:http://bues.ch/cms/hacking/razercfg.html
我已经下载了 tar.bz2 存档并将其解压到我的主文件夹中。
我打开了自述文件,现在我已经在安装说明的开头停留了几个小时。我正在按照位于存档中的自述文件中的说明进行操作。
我已经设法得到'请参阅 cmake。' 通过终端进入目录并运行此命令就可以工作(我认为)。
cmake 的输出:
wico@wico-System-Product-Name ~/razerconfig $ cmake .
-- The C compiler identification is GNU 4.8.4
-- 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
-- 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/wico/razerconfig
wico@wico-System-Product-Name ~/razerconfig $
现在我在终端中尝试运行“make”时遇到了麻烦。
我收到的错误是:
make: *** No targets specified and no makefile found. Stop.
我已经尝试进行安装:
make: *** No rule to make target `install'. Stop.
我遇到一些提示说我应该使用 autoconf:
autoconf: error: no input file
其他地方提到我应该尝试 ./configure
bash: ./configure: No such file or directory
我也尝试过检查安装除此之外。我还读到过依赖关系是一种可能的解决方案。
现在,我设法更进一步,我将把回复标记为答案。
我意识到我的问题会不断扩大,因此我在这里提出了有关安装最后部分的另一个问题: 使用 systemd 让 razercfg 工作 - systemctl:未找到命令
答案1
按照下面的命令,我测试了所有这些可能性:
git clone git://git.bues.ch/razer.git
cd razer
mkdir build
cd build
cmake ..
make
或者
git clone git://git.bues.ch/razer.git
cd razer
cmake .
make
或者
wget http://bues.ch/razercfg/razercfg-0.32.tar.bz2
tar xf razercfg-0.32.tar.bz2
cd razercfg-0.32
cmake .
make
在那之后:
sudo checkinstall
或者是否存在依赖性问题
sudo make install
现在按照步骤README
如果你使用 systemd:
该
make install
步骤安装了 razerd.service 文件。重新启动或以 root 身份运行以下命令来启动 razerd 守护进程:
systemctl start razerd
如果您不使用 systemd:
要在启动时自动启动所需的系统守护进程“razerd”,您需要安装 init-script。此软件包包含一个通用示例脚本,该脚本应可在许多 Linux 发行版上开箱即用。要安装它,请以 root 身份调用以下命令:
cp ./razerd.initscript /etc/init.d/razerd
ln -s /etc/init.d/razerd /etc/rc2.d/S99razerd
ln -s /etc/init.d/razerd /etc/rc5.d/S99razerd
ln -s /etc/init.d/razerd /etc/rc0.d/K01razerd
ln -s /etc/init.d/razerd /etc/rc6.d/K01razerd
如果你使用 udev:
该
make install
步骤将 udev 脚本安装到该发行版中,
$(pkg-config --variable=udevdir udev)/rules.d/80-razer.rules
这应该适用于大多数发行版。如果 udev 通知不起作用,请尝试重新启动系统。
示例输出cmake .
和make
[aboettger:~/tmp/razercfg-0.32] % cmake .
-- The C compiler identification is GNU 4.9.2
-- 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
-- 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/aboettger/tmp/razercfg-0.32
[aboettger:~/tmp/razercfg-0.32] % make
Scanning dependencies of target razer
[ 5%] Building C object librazer/CMakeFiles/razer.dir/buttonmapping.o
[ 10%] Building C object librazer/CMakeFiles/razer.dir/profile_emulation.o
[ 15%] Building C object librazer/CMakeFiles/razer.dir/librazer.o
[ 20%] Building C object librazer/CMakeFiles/razer.dir/config.o
[ 25%] Building C object librazer/CMakeFiles/razer.dir/util.o
[ 30%] Building C object librazer/CMakeFiles/razer.dir/synapse.o
[ 35%] Building C object librazer/CMakeFiles/razer.dir/cypress_bootloader.o
[ 40%] Building C object librazer/CMakeFiles/razer.dir/hw_boomslangce.o
[ 45%] Building C object librazer/CMakeFiles/razer.dir/hw_copperhead.o
[ 50%] Building C object librazer/CMakeFiles/razer.dir/hw_deathadder.o
[ 55%] Building C object librazer/CMakeFiles/razer.dir/hw_deathadder2013.o
[ 60%] Building C object librazer/CMakeFiles/razer.dir/hw_deathadder_chroma.o
[ 65%] Building C object librazer/CMakeFiles/razer.dir/hw_krait.o
[ 70%] Building C object librazer/CMakeFiles/razer.dir/hw_lachesis.o
[ 75%] Building C object librazer/CMakeFiles/razer.dir/hw_lachesis5k6.o
[ 80%] Building C object librazer/CMakeFiles/razer.dir/hw_naga.o
[ 85%] Building C object librazer/CMakeFiles/razer.dir/hw_imperator.o
[ 90%] Building C object librazer/CMakeFiles/razer.dir/hw_taipan.o
Linking C shared library librazer.so
[ 90%] Built target razer
Scanning dependencies of target razerd
[ 95%] Building C object razerd/CMakeFiles/razerd.dir/razerd.o
Linking C executable razerd
[ 95%] Built target razerd
Scanning dependencies of target pyrazer
[100%] Generating build/stamp
running build
running build_py
creating /home/aboettger/tmp/razercfg-0.32/ui/build
creating /home/aboettger/tmp/razercfg-0.32/ui/build/lib
creating /home/aboettger/tmp/razercfg-0.32/ui/build/lib/pyrazer
copying pyrazer/main.py -> /home/aboettger/tmp/razercfg-0.32/ui/build/lib/pyrazer
copying pyrazer/__init__.py -> /home/aboettger/tmp/razercfg-0.32/ui/build/lib/pyrazer
running build_scripts
creating /home/aboettger/tmp/razercfg-0.32/ui/build/scripts-3.4
copying and adjusting razercfg -> /home/aboettger/tmp/razercfg-0.32/ui/build/scripts-3.4
copying and adjusting qrazercfg -> /home/aboettger/tmp/razercfg-0.32/ui/build/scripts-3.4
changing mode of /home/aboettger/tmp/razercfg-0.32/ui/build/scripts-3.4/razercfg from 664 to 775
changing mode of /home/aboettger/tmp/razercfg-0.32/ui/build/scripts-3.4/qrazercfg from 664 to 775
[100%] Built target pyrazer
示例输出sudo checkinstall
[aboettger:~/tmp/razercfg-0.32] % sudo checkinstall
checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.
*****************************************
**** Debian package creation selected ***
*****************************************
This package will be built according to these values:
0 - Maintainer: [ root@sturm ]
1 - Summary: [ Package created with checkinstall 1.6.2 ]
2 - Name: [ razercfg ]
3 - Version: [ 0.32 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ amd64 ]
8 - Source location: [ razercfg-0.32 ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ razercfg ]
12 - Conflicts: [ ]
13 - Replaces: [ ]
Enter a number to change any of them or press ENTER to continue:
Installing with make install...
========================= Installation results ===========================
[ 90%] Built target razer
[ 95%] Built target razerd
[100%] Built target pyrazer
Install the project...
-- Install configuration: ""
-- Installing: /lib/udev/rules.d/80-razer.rules
-- udevadm control --reload-rules: 0
-- Installing: /etc/pm/sleep.d/50-razer
-- Installing: /lib/systemd/system/razerd.service
-- systemctl --system daemon-reload: 0
-- systemctl --system enable razerd.service: 0
-- Installing: /usr/local/lib/librazer.so
-- ldconfig: 0
-- Installing: /usr/local/bin/razerd
-- Removed runtime path from "/usr/local/bin/razerd"
running install
running build
running build_py
running build_scripts
running install_lib
creating /usr/local/lib/python3.4
creating /usr/local/lib/python3.4/dist-packages
creating /usr/local/lib/python3.4/dist-packages/pyrazer
copying build/lib/pyrazer/main.py -> /usr/local/lib/python3.4/dist-packages/pyrazer
copying build/lib/pyrazer/__init__.py -> /usr/local/lib/python3.4/dist-packages/pyrazer
byte-compiling /usr/local/lib/python3.4/dist-packages/pyrazer/main.py to main.cpython-34.pyc
byte-compiling /usr/local/lib/python3.4/dist-packages/pyrazer/__init__.py to __init__.cpython-34.pyc
running install_scripts
copying build/scripts-3.4/qrazercfg -> /usr/local/bin
copying build/scripts-3.4/razercfg -> /usr/local/bin
changing mode of /usr/local/bin/qrazercfg to 775
changing mode of /usr/local/bin/razercfg to 775
running install_egg_info
Writing /usr/local/lib/python3.4/dist-packages/razercfg-0.32-py3.4.egg-info
-- Installing: /usr/local/bin/razer-gamewrapper
======================== Installation successful ==========================
Copying documentation directory...
./
./README
./COPYING
Some of the files created by the installation are inside the home directory: /home
You probably don't want them to be included in the package.
Do you want me to list them? [n]:
Should I exclude them from the package? (Saying yes is a good idea) [n]:
Some of the files created by the installation are inside the build
directory: /home/aboettger/tmp/razercfg-0.32
You probably don't want them to be included in the package,
especially if they are inside your home directory.
Do you want me to list them? [n]:
Should I exclude them from the package? (Saying yes is a good idea) [y]:
Copying files to the temporary directory...OK
Stripping ELF binaries and libraries...OK
Compressing man pages...OK
Building file list...OK
Building Debian package...OK
Installing Debian package...OK
Erasing temporary files...OK
Writing backup package...OK
OK
Deleting temp dir...OK
**********************************************************************
Done. The new package has been installed and saved to
/home/aboettger/tmp/razercfg-0.32/razercfg_0.32-1_amd64.deb
You can remove it from your system anytime using:
dpkg -r razercfg
**********************************************************************