![我尝试安装 gpsd-3.21 来使用 ubxtool,但遇到了问题](https://linux22.com/image/1019334/%E6%88%91%E5%B0%9D%E8%AF%95%E5%AE%89%E8%A3%85%20gpsd-3.21%20%E6%9D%A5%E4%BD%BF%E7%94%A8%20ubxtool%EF%BC%8C%E4%BD%86%E9%81%87%E5%88%B0%E4%BA%86%E9%97%AE%E9%A2%98.png)
https://fossies.org/linux/gpsd/build.adoc 使用此链接安装时出现问题。输入 scons 和 scons chek 命令后。
jhkim@***:~/Desktop/gpsd-3.21$ scons udev-install
scons: Reading SConscript files ...
scons version: 3.0.1
scons is running under Python version: 3.6.9.final.0
gpsd version: 3.21
This system is: linux
Checking whether the C compiler works... (cached) yes
Checking if compiler accepts -pthread... (cached) yes
Checking whether the C++ compiler works... (cached) yes
Checking for C header file curses.h... (cached) yes
Checking pkg-config for ncurses... (cached) no
Checking pkg-config for libusb-1.0... (cached) no
Checking for C library librt... (cached) yes
Checking for C library libnsl... (cached) yes
Checking for C library libsocket... (cached) no
Checking for C library libm... (cached) yes
Checking for C library libthr... (cached) no
Checking pkg-config for dbus-1... (cached) no
Turning off dbus-export support, library not found.
Checking pkg-config for bluez... (cached) no
Turning off Bluetooth support, library not found.
Checking for C type in_port_t... (cached) yes
Checking whether SUN_LEN is declared... (cached) yes
Checking for C header file linux/can.h... (cached) yes
You have kernel CANbus available.
Checking if compiler is C11... (cached) yes
Checking whether __STDC_NO_ATOMICS__ is declared... (cached) no
Checking for C header file stdatomic.h... (cached) yes
Checking whether __ORDER_BIG_ENDIAN__ is declared... (cached) yes
Checking whether __ORDER_LITTLE_ENDIAN__ is declared... (cached) yes
Checking whether __BYTE_ORDER__ is declared... (cached) yes
Your compiler has built-in endianness support.
Checking for C header file arpa/inet.h... (cached) yes
Checking for C header file netdb.h... (cached) yes
Checking for C header file netinet/in.h... (cached) yes
Checking for C header file netinet/ip.h... (cached) yes
Checking for C header file sys/sysmacros.h... (cached) yes
Checking for C header file sys/socket.h... (cached) yes
Checking for C header file sys/un.h... (cached) yes
Checking for C header file syslog.h... (cached) yes
Checking for C header file termios.h... (cached) yes
Checking for C header file winsock2.h... (cached) no
Checking if sizeof(time_t) is 64 bits... (cached) yes
Checking for C function cfmakeraw()... (cached) yes
Checking for C function clock_gettime()... (cached) yes
Checking for C function daemon()... (cached) yes
Checking for C function fcntl()... (cached) yes
Checking for C function fork()... (cached) yes
Checking for C function getopt_long()... (cached) yes
Checking for C function gmtime_r()... (cached) yes
Checking for C function inet_ntop()... (cached) yes
Checking for C function strlcat()... (cached) no
Checking for C function strlcpy()... (cached) no
Checking for C function strptime()... (cached) yes
Checking for C function sincos()... (cached) yes
Checking for C header file sys/timepps.h... (cached) yes
Checking whether TIOCMIWAIT is declared... (cached) yes
Checking that xsltproc can make man pages... (cached) yes
Checking pkg-config for QtNetwork... (cached) no
Turning off Qt support, library not found.
Checking if compiler accepts -Wall... (cached) yes
Checking if compiler accepts -Wcast-align... (cached) yes
Checking if compiler accepts -Wextra... (cached) yes
Checking if compiler accepts -Wimplicit-fallthrough... (cached) yes
Checking if compiler accepts -Wmissing-declarations... (cached) yes
Checking if compiler accepts -Wmissing-prototypes... (cached) yes
Checking if compiler accepts -Wno-missing-field-initializers... (cached) yes
Checking if compiler accepts -Wno-uninitialized... (cached) yes
Checking if compiler accepts -Wpointer-arith... (cached) yes
Checking if compiler accepts -Wreturn-type... (cached) yes
Checking if compiler accepts -Wstrict-prototypes... (cached) yes
Checking if compiler accepts -Wvla... (cached) yes
Checking whether python program exists.../usr/bin/python
Checking Python lib dir... (cached) /usr/lib/python3/dist-packages
Ensure your PYTHONPATH includes /usr/local/lib/python3/dist-packages/
Checking Python config vars... ok
(cached) Checking Python target version... (cached) 3.6
Checking Python module serial (pyserial)... (cached)
WARNING: ubxtool and zerk are missing optional runtime module serial
Checking Python module cairo (pycairo)... (cached) found
Checking Python module gi (pygobject)... (cached) found
Checking pkg-config for gtk+-3.0... (cached) no
WARNING: gtk+-3.0 not found.
WARNING: xgps and xgpsspeed are missing runtime dependencies
Altered configuration variables:
dbus_export = False (default True): enable DBUS export support
bluez = False (default True): BlueZ support for Bluetooth devices
qt = False (default True): build Qt bindings
scons: done reading SConscript files.
scons: Building targets ...
Install file: "systemd/[email protected]" as "/lib/systemd/system/[email protected]"
scons: *** [/lib/systemd/system/[email protected]] /lib/systemd/system/[email protected]: No such file or directory
scons: building terminated because of errors.
WARNING: xgps and xgpsspeed are missing runtime dependencies
WARNING: ubxtool and zerk are missing optional runtime module serial
我该怎么做才能解决这个问题?
答案1
补充其他答案关于使用存储库。
我相信 3.17 和 3.21 没有严重的差异。
无论如何,您需要获取构建依赖项并使用构建工具进行编译:
打开软件和更新(
software-properties-gtk
)并启用源代码,确认重新加载包缓存打开终端并获取所有需要的构建工具和依赖项
sudo apt-get install build-essential sudo apt-get build-dep gpsd
编译gpsd-3.21正如您计划的那样。
答案2
对于大多数用途来说,可以通过 APT 包管理器进行安装gpsd
,而不必从源代码构建:ubxtool
$ sudo apt install gpsd gpsd-clients