INSTALL.adoc 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767
  1. = GPSD Installation Instructions
  2. :title: GPSD Installation Instructions
  3. :description: Steps for installing GPSD and verifying its performance.
  4. :keywords: GPSD, GPS, installation
  5. :author: Eric S. Raymond <esr@thyrsus.com>
  6. :robots:index,follow
  7. Here are the steps for installing GPSD and verifying its performance.
  8. They assume you have GPSD available as an installable binary package,
  9. Instructions for building GPSD from source (including cross-building)
  10. are in the file "build.adoc" in the source distribution.
  11. Most of these installation instructions are generic to Linux. There are
  12. some special notes on installation on *BSD, WSL, OS X, macOS, and the
  13. Raspberry Pi near the end of this file.
  14. == Check that your GPS is live and you can get data from it
  15. Start by making sure you can get data from your GPS, otherwise the later
  16. steps will be very frustrating. In this command:
  17. stty -F /dev/ttyXXX ispeed 4800 && cat </dev/ttyXXX
  18. replace ttyXXX with the filename of the port. This will probably be
  19. either /dev/ttyUSB0 or /dev/ttyS0. If you are on a *BSD Unix or MacOS X,
  20. replace -F with -f.
  21. When you run this command, you should see text lines beginning with $
  22. come to stdout (possibly after a short initial burst of binary
  23. garbage). If you don't see this, you may have OS-level problems with
  24. your serial support, but more likely have the wrong device. Look
  25. again.
  26. If you have trouble with the preceding step, check your cabling
  27. first. Verify that the device is connected and that its power LED
  28. (if it has one) is lit.
  29. If you seem to have some sort of serial-device problem, check that
  30. your kernel properly supports the device you are using. For GPSes
  31. using an RS-232 port (which is no longer common) you will need
  32. serial-port support compiled into your kernel. Various USB-to-serial
  33. adapter chips found in GPSes require specific drivers.
  34. Under a stock Linux kernel these will all be loaded on demand when
  35. the USB system sees the appropriate vendor/product ID combinations.
  36. See build.adoc for instructions relating to custom kernels.
  37. == Check that your system configuration will allow GPSD to work
  38. Ensure that device permissions will enable gpsd to read from and write
  39. to GPS devices even after it drops root privileges. If you are
  40. running Fedora Core, Ubuntu, or stock Debian you can skip this step,
  41. as the stock configuration has the right properties.
  42. gpsd requires two things: (1) that GPS devices have group read and
  43. write enabled, and (2) all of them have the same group ID as a
  44. prototypical device, typically /dev/ttyS0 under Linux or /dev/tty00
  45. under *BSD. It does not actually matter what the owning group is, as
  46. gpsd will look this up on startup. Alternatively, (3), you can set a
  47. fallback group with the gpsd-group option in case the prototype is not
  48. found: this should be the group that has write access to serial
  49. devices. On Debian and derivatives including Ubuntu this is "dialout";
  50. on Gentoo/Fedora/openSuse it is "uucp".
  51. Before dropping privileges, gpsd will ensure that it has access to
  52. devices given to it on the command line by forcing their group read
  53. and write permissions on.
  54. On a Linux with udev, check the files in /etc/udev/permissions.d to
  55. ensure that /dev/tty* devices are all created with the same group
  56. and with 0660 permissions.
  57. When gpsd drops privileges, its default is to set uid to 'nobody' and
  58. group to the owning group of the prototype device (the configure
  59. option gpsd-user=foo will cause gpsd to change to 'foo'
  60. instead).
  61. If your system has the Linux hotplug facility installed you can skip
  62. the permission-setting part; the hotplug scripts will force the
  63. permissions for you. You still have to make sure all the tty devices
  64. are in the same group.
  65. == Check your installation prerequisites
  66. A minimum build of GPSD can run pretty close to the metal; all it
  67. absolutely needs is the C runtime support. The test clients and
  68. various additional features have additional prerequisites:
  69. |===============================================================================
  70. |pps-tools | for PPS time keeping
  71. |dbus | gpsd will issue DBUS notifications
  72. |ncurses | for cgps and gpsmon clients
  73. |libtinfo5 | low-level terminfo library (see below)
  74. |libusb-1.0.x or later | for older Garmin USB devices
  75. |Qt | libQgpsmm depends on this
  76. |python2.x(x>=6) or 3.y(y>=2) | required for various clients and utilities
  77. |PyGObject | for xps and xgpsspeed clients (see below)
  78. |python-cairo | for python-GI
  79. |GTK | for python-GI
  80. |pyserial | for ubxtool and zerk in direct-serial mode
  81. |gnuplot | to plot gpsprof output.
  82. |===============================================================================
  83. Some ncurses packages contain the terminfo library; some break it out
  84. separately as libtinfo5 or libtinfo.
  85. The PyGObject package goes by several names, and is split up into sub
  86. packages different ways, depending on the distribution. Sometimes
  87. python-gi, python-gobject, python-cairo, etc. The packages also need
  88. the underlying system libraries (GTK, GLib, etc.)
  89. The asynchronous python module (gps/aiogps.py) and its example client
  90. (example_aiogps.py) require Python 3.6+.
  91. See below for more specific module requirements in the individual
  92. distribution instructions.
  93. == Installing gpsd
  94. === Install your distributions package(s)
  95. Up-to-date gpsd packages are generally available for Linux distributions
  96. including Debian and derivatives (including Ubuntu and Mint), Fedora and
  97. derivatives (including CentOS), openSUSE, PCLinuxOS, Mageia, Gentoo, and
  98. Slackware. In the embedded space, CeroWRT and Yocto carry GPSD. The
  99. GPSD package in the FreeBSD ports tree is also reliably up to date.
  100. Even if your distribution is not on this list, it is quite likely GPSD
  101. has already been packaged for it.
  102. Whatever distribution you are running, the name of the core GPSD
  103. package containing the service daemon is almost certainly "gpsd".
  104. However, many distributions break up GPSD into separate installable
  105. packages for the core daemon and clients; you should search your
  106. repository index for anything with gpsd as a prefix.
  107. === Install from source code
  108. Directions for installing from source are in the file build.adoc found
  109. in the source distribution.
  110. == How to test the software
  111. 1. Start gpsd. You'll need to give it as an argument a path to
  112. a serial or USB port with a GPS attached to it. Your test command
  113. should look something like this:
  114. gpsd -D 5 -N -n /dev/ttyUSB0
  115. 2. Once gpsd is running, telnet to port 2947. You should see a
  116. greeting line that's a JSON object describing GPSD's version.
  117. Now plug in your GPS (or AIS receiver, or RTCM2 receiver).
  118. 3. Type '?WATCH={"enable":true,"json":true};' to start raw and
  119. watcher modes. You should see lines beginning with '{' that are
  120. JSON objects representing reports from your GPS; these are reports
  121. in GPSD protocol.
  122. 4. Start the xgps or cgps client. Calling it with no arguments
  123. should do the right thing. You should see a display panel with
  124. position/velocity-time information, and a satellite display. The
  125. displays won't look very interesting until the GPS acquires satellite
  126. lock.
  127. 5. Have patience. If you are cold-starting a new GPS, it may take
  128. 15-20 minutes after it gets a skyview for it to download an ephemeris
  129. and begin delivering fixes.
  130. 6. A FAQ and troubleshooting instructions can be found at the GPSD
  131. project site.
  132. == Once you have verified correct operation
  133. 1. If you installed from a '.deb' package under Debian or a
  134. Debian-derived system, you may need to `dpkg-reconfigure -plow gpsd' to
  135. enable the hotplug magic ("Start gpsd automatically").
  136. 2. Check out the list of supported hardware at the Hardware page on
  137. the GPSD project's website. If your GPS isn't on the list, please send
  138. us information to add a new line to the table. Directions are
  139. included on that page. We can also use updates of the latest version
  140. number known to work with hardware already supported.
  141. 3. GPSD includes gpsd.php, a PHP script, that you can use to generate
  142. a PHP status page for your GPS if you wish. (It may not be in the
  143. core package.) It should be manually copied to your HTTP document
  144. directory. The first time it's invoked, it will generate a file
  145. called 'gpsd_config.inc' in that directory containing configuration
  146. information; edit to taste.
  147. 4. There are other non-essential scripts that may be useful; these
  148. are in the contrib/ directory of the source. They may not be available
  149. in the packages available from distributions.
  150. For special instructions related to using GPSD for time service, see the
  151. GPSD Time Service HOWTO in the distribution or on the web.
  152. == Special Notes for OS X Installation
  153. gpsd will build, install and run on OS X (osX). The easiest way to
  154. do so is to first install the MacPorts package. Follow their install
  155. procedure at: http://www.macports.org/install.php
  156. Then use their port command to install scons. Optionally git if you
  157. want to access the development source. Optionally install libxslt and
  158. xmlto to build the documentation.
  159. --------------------------------------------------------------
  160. # port install scons
  161. # port install git
  162. # port install libxslt
  163. # port install xmlto
  164. --------------------------------------------------------------
  165. Currently the osX port does not work with Qt5. To see the build
  166. failure:
  167. --------------------------------------------------------------
  168. # port install qt5
  169. # scons --config=force qt_versioned=5
  170. --------------------------------------------------------------
  171. If you have Qt5 installed, and want to avoid the build failure, bui.d
  172. this way:
  173. --------------------------------------------------------------
  174. # scons --config=force qt=no
  175. --------------------------------------------------------------
  176. While running gpsd, or scons check, you may run out of shared memory
  177. segments. If so, you will see this error message:
  178. --------------------------------------------------------------
  179. gpsd:ERROR: shmat failed: Too many open files
  180. --------------------------------------------------------------
  181. By default OS X allows a very small number of shared segments. You
  182. can check your allowed maximum number of shared segments, then increase
  183. the maximum number, with these commands:
  184. --------------------------------------------------------------
  185. # sysctl kern.sysv.shmseg=8
  186. kern.sysv.shmseg: 32 -> 8
  187. # sysctl -a | fgrep shmseg
  188. kern.sysv.shmseg: 8
  189. # sysctl kern.sysv.shmseg=16
  190. kern.sysv.shmseg: 8 -> 16
  191. # sysctl -a | fgrep shmseg
  192. kern.sysv.shmseg: 16
  193. --------------------------------------------------------------
  194. If you are using a USB based GPS you will likely need the Prolific
  195. PL2303 driver. You can find it here:
  196. http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=229&pcid=41
  197. == Special Notes for Raspberry Pi Installation
  198. gpsd will build, install and run on the Raspberry Pi (RasPi) and Pi 2
  199. using Debian jessie. Other distributions based on
  200. Debian (raspbian, etc) will work fine as well. The gpsd
  201. package in Debian Wheezy is known to be flaky, be sure to update to a
  202. new version of gpsd from source.
  203. === Raspbian
  204. Before compiling gpsd from source, you will need to update your system
  205. as root. Switching to the latest Raspbian distribution (Buster) is
  206. strongly recommended.
  207. --------------------------------------------------------------
  208. # apt-get update
  209. # apt-get dist-upgrade
  210. # rpi-update
  211. # reboot
  212. --------------------------------------------------------------
  213. Multiple versions of gpsd can not co-exist on the same system. You need
  214. to ensure gpsd from a package is not on the system:
  215. --------------------------------------------------------------
  216. # apt purge gpsd
  217. --------------------------------------------------------------
  218. Then install the required packages:
  219. --------------------------------------------------------------
  220. # apt-get install scons libncurses5-dev python-dev pps-tools
  221. # apt-get install git-core
  222. --------------------------------------------------------------
  223. Git-core is required to build from a git repository. pps-tools is for
  224. PPS timing.
  225. The rest of the installation is just as for any other source based
  226. install, as noted in the file *build.adoc*.
  227. === Other Debian derivatives (including stock)
  228. ==== Buster (10) with python2
  229. These Buster instructions seem to also work for Devuan and Maemo Leste.
  230. Multiple versions of gpsd can not co-exist on the same system. You need
  231. to ensure gpsd from a package is not on the system:
  232. --------------------------------------------------------------
  233. # apt purge gpsd
  234. --------------------------------------------------------------
  235. Then update your system, and install the packages required by gpsd:
  236. --------------------------------------------------------------
  237. # apt-get update
  238. # apt-get dist-upgrade
  239. # reboot
  240. # apt-get install scons libncurses-dev python-dev pps-tools
  241. # apt-get install git-core
  242. # apt-get install build-essential manpages-dev pkg-config
  243. --------------------------------------------------------------
  244. If "apt-get install scons" fails, check the file "/etc/apt/sources.list".
  245. Git-core is required to build from a git repository.
  246. pps-tools is for PPS timing.
  247. Build-essential installs the compiler and associated tools.
  248. Manpages-dev is the associated man pages.
  249. Pkg-config is a helper for scons.
  250. Gtk3 is only required to run xgps and xgpsspeed. You do not need a local
  251. X11 server installed, but it still pulls in a lot of packages.
  252. --------------------------------------------------------------
  253. # apt-get install python-gi-dev python-cairo-dev
  254. # apt-get install python-gobject-dev libgtk-3-dev
  255. --------------------------------------------------------------
  256. Ubxtool and zerk may optionally use the pyserial module for
  257. direct connection to the GNSS receiver:
  258. --------------------------------------------------------------
  259. # apt-get install python-serial
  260. --------------------------------------------------------------
  261. gpsd may optional connect to dbus with the libdbus package:
  262. --------------------------------------------------------------
  263. # apt-get install libdbus-1-dev
  264. --------------------------------------------------------------
  265. Some very old Garmin USB devices need libusb:
  266. --------------------------------------------------------------
  267. # apt-get install libusb-1.0-0-dev
  268. --------------------------------------------------------------
  269. If you wish to build the documentation, be warned it pulls in a
  270. lot of packages. To build the doc install:
  271. --------------------------------------------------------------
  272. apt-get install xsltproc docbook-xsl xmlto asciidoctor
  273. --------------------------------------------------------------
  274. The rest of the installation is just as for any other source based
  275. install, as noted in the file *build.adoc*.
  276. --------------------------------------------------------------
  277. # git clone https://gitlab.com/gpsd/gpsd.git
  278. # cd gpsd
  279. # scons --config=force && scons install
  280. --------------------------------------------------------------
  281. ==== Jessie (8)
  282. Multiple versions of gpsd can not co-exist on the same system. You need
  283. to ensure gpsd from a package is not on the system:
  284. --------------------------------------------------------------
  285. # apt purge gpsd
  286. --------------------------------------------------------------
  287. Then install the required packages:
  288. --------------------------------------------------------------
  289. # apt-get install scons libncurses5-dev python-dev pps-tools
  290. # apt-get install git-core
  291. --------------------------------------------------------------
  292. Git-core is required to build from a git repository. pps-tools is for
  293. PPS timing.
  294. The rest of the installation is just as for any other source based
  295. install, as noted in the file *build.adoc*.
  296. ==== Wheezy
  297. Multiple versions of gpsd can not co-exist on the same system. You need
  298. to ensure gpsd from a package is not on the system:
  299. --------------------------------------------------------------
  300. # apt purge gpsd
  301. --------------------------------------------------------------
  302. Wheezy, being older, requires updating the tools for compiling
  303. and testing gpsd:
  304. You need scons at 2.3.0 or higher to build.
  305. If your scons is less than 2.3.0 you will need to get a newer scons
  306. from wheezy-backport. Partial instructions are detailed here:
  307. https://backports.debian.org/Instructions/
  308. Basically you need to add this line to /etc/apt/sources.list:
  309. --------------------------------------------------------------
  310. deb http://http.debian.net/debian wheezy-backports main
  311. --------------------------------------------------------------
  312. Then do another update:
  313. --------------------------------------------------------------
  314. apt-get update
  315. --------------------------------------------------------------
  316. Which may lead you to this error if you lack a full set of debian keys:
  317. --------------------------------------------------------------
  318. W: GPG error: http://http.debian.net wheezy-backports Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553
  319. --------------------------------------------------------------
  320. Partial but detailed instructions to fix that are here:
  321. --------------------------------------------------------------
  322. https://wiki.debian.org/SecureApt
  323. --------------------------------------------------------------
  324. Use either of the following code blocks. The first is more robust:
  325. --------------------------------------------------------------
  326. apt-get install debian-archive-keyring
  327. --------------------------------------------------------------
  328. --------------------------------------------------------------
  329. gpg --keyserver pgpkeys.mit.edu --recv 8B48AD6246925553
  330. gpg -a --export 46925553 | apt-key add -
  331. apt-get update
  332. --------------------------------------------------------------
  333. You can now install scons from the wheezy-backports repository:
  334. --------------------------------------------------------------
  335. apt-get -t wheezy-backports install scons
  336. --------------------------------------------------------------
  337. and other tools:
  338. --------------------------------------------------------------
  339. # apt-get install scons libncurses5-dev python-dev pps-tools
  340. # apt-get install git-core
  341. --------------------------------------------------------------
  342. Git-core is required to build from a git repository. pps-tools is for
  343. PPS timing.
  344. The rest of the installation is just as for any other source based
  345. install, as noted in the file *build.adoc*.
  346. ==== Ubuntu Buster 20
  347. If you have Raspbian Buster, that is not this.
  348. Preliminary install notes.
  349. Multiple versions of gpsd can not co-exist on the same system. You need
  350. to ensure gpsd from a package is not on the system:
  351. --------------------------------------------------------------
  352. # apt purge gpsd
  353. --------------------------------------------------------------
  354. Then install the required packages:
  355. --------------------------------------------------------------
  356. apt install gcc scons python-gi python-gi-cairo g++
  357. apt install python-gobject libgtk-3-dev
  358. apt install libncurses5-dev libtinfo-dev pps-tools
  359. apt install gir1.2-gtk-3.0
  360. --------------------------------------------------------------
  361. If you wish to build the documentation, be warned it pull in a
  362. lot of packages. To build the doc install:
  363. --------------------------------------------------------------
  364. apt install xsltproc docbook-xsl xmlto asciidoctor
  365. --------------------------------------------------------------
  366. The rest of the installation is just as for any other source based
  367. install, as noted in the file *build.adoc* .
  368. ==== Ubuntu 18.04 LTS
  369. Preliminary install notes.
  370. If you have Raspbian Buster, that is not this.
  371. Multiple versions of gpsd can not co-exist on the same system. You need
  372. to ensure gpsd from a package is not on the system:
  373. --------------------------------------------------------------
  374. # apt purge gpsd
  375. --------------------------------------------------------------
  376. Then install the required packages:
  377. --------------------------------------------------------------
  378. apt install gcc scons python-gi python-gi-cairo g++
  379. apt install libncurses5-dev libtinfo-dev pps-tools
  380. apt install gir1.2-gtk-3.0
  381. --------------------------------------------------------------
  382. If you wish to build the documentation, be warned it pulls in a
  383. lot of packages. To build the doc install:
  384. --------------------------------------------------------------
  385. apt install xsltproc docbook-xsl xmlto asciidoctor
  386. --------------------------------------------------------------
  387. The rest of the installation is just as for any other source based
  388. install, as noted in the file *build.adoc*.
  389. === Other Raspberry Pi tips
  390. Any USB connected GPS that is known to work with gpsd will work fine on
  391. the RasPi. No special instructions apply.
  392. A very popular option is to install the AdaFruit Ultimate GPS HAT. With
  393. this GPS you also get a good 1PPS signal. This works as any other GPS
  394. with gpsd, but there are two things to note. The GPS takes over the
  395. serial console: /dev/ttyAMA0. The PPS signal will be on GPIO Pin #4.
  396. Only three specific changes need to be made to make the HAT work. First
  397. in the file /boot/cmdline.txt, remove this part "console=ttyAMA0,115200
  398. kgdboc=ttyAMA0,115200". That frees the serial port from console use so
  399. the GPS can use it.
  400. Second you need to tell the boot process to load the pps_gpio module
  401. and attach /dev/pps0 to GPIO pin 4. Do that by adding this line
  402. to the bottom of /boot/config.txt: dtoverlay=pps-gpio,gpiopin=4
  403. Reboot so those changes take effect.
  404. Run gpsd like this:
  405. --------------------------------------------------------------
  406. ~ # gpsd -D 5 -N -n /dev/ttyAMA0 /dev/pps0
  407. --------------------------------------------------------------
  408. If you are on the RasPi with gpsd version 3.17, or above, /dev/pps0 can
  409. be autodetected, and used for PPS if available.
  410. gpsd 3.17 and up only:
  411. --------------------------------------------------------------
  412. ~ # gpsd -D 5 -N -n /dev/ttyAMA0
  413. --------------------------------------------------------------
  414. You can verify gpsd is using the PPS by running ntpshmmon:
  415. --------------------------------------------------------------
  416. ~ # ntpshmmon
  417. # Name Seen@ Clock Real L Prec
  418. sample NTP0 1461619703.641899335 1461619703.445224418 1461619703.000000000 0 -1
  419. sample NTP2 1461619703.642203397 1461619702.999262204 1461619703.000000000 0 -20
  420. sample NTP0 1461619704.142097363 1461619703.445224418 1461619703.000000000 0 -1
  421. sample NTP2 1461619704.142204134 1461619703.999258157 1461619704.000000000 0 -20
  422. --------------------------------------------------------------
  423. If you do not see NTP2 then you misconfigured the pps_gpio driver.
  424. The serial time is provided to ntpd on NTP0, the PPS time is on NTP2, not
  425. on NTP1 like described earlier. So your ntp.conf will need to be adjusted
  426. from:
  427. --------------------------------------------------------------
  428. # GPS PPS reference (NTP1)
  429. server 127.127.28.1 prefer
  430. fudge 127.127.28.1 refid PPS
  431. --------------------------------------------------------------
  432. To:
  433. --------------------------------------------------------------
  434. # GPS PPS reference (NTP2)
  435. server 127.127.28.2 prefer
  436. fudge 127.127.28.2 refid PPS
  437. --------------------------------------------------------------
  438. Now proceed as for any other operating system to use gpsd.
  439. Be sure to validate that your PPS signal is not offset by the pulse
  440. width. That would mean gpsd is using the wrong edge.
  441. Detailed instructions are available from their website:
  442. https://learn.adafruit.com/adafruit-ultimate-gps-hat-for-raspberry-pi/
  443. You will need to dig deeper to make the PPS work, here is a good reference:
  444. http://www.satsignal.eu/ntp/Raspberry-Pi-NTP.html
  445. == BSD derivatives ==
  446. === Special Notes for FreeBSD Installation ===
  447. gpsd will build, install and run on FreeBSD.
  448. Due to the missing CAN bus support (linux/can.h), NMEA2000/CAN
  449. is not supporten on FreeBSD.
  450. Use their pkg command to install scons, and optionally git if you
  451. want to access the development source.
  452. If you want to build the QT bindings, you'll also need the
  453. qt5-network and pkgconf packages.
  454. --------------------------------------------------------------
  455. # pkg install scons
  456. # pkg install git
  457. # ln -s /usr/local/bin/python2.7 /usr/local/bin/python
  458. # ln -s /usr/local/bin/python2.7 /usr/local/bin/python2
  459. # ln -s /usr/local/bin/python3.6 /usr/local/bin/python3
  460. # git clone https://gitlab.com/gpsd/gpsd.git
  461. # cd gpsd
  462. # scons --config=force && scons install
  463. --------------------------------------------------------------
  464. FreeBSD fails to create the python links as required by PEP394.
  465. So you need to add them yourself, as above.
  466. === Special Notes for NetBSD 8.1 Installation
  467. gpsd will build, install and run on NetBSD.
  468. Use their 'pkg_add' command to install pkgin. Then use pkgin to
  469. install the required tools.
  470. --------------------------------------------------------------
  471. # export PKG_PATH=\
  472. "http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/8.1/All"
  473. # pkg_add -v pkgin
  474. # echo http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/8.1/All > \
  475. /usr/pkg/etc/pkgin/repositories.conf
  476. # pkgin update
  477. # pkgin install python37 py37-curses
  478. # ln -s /usr/pkg/bin/python3.7 /usr/pkg/bin/python
  479. # ln -s /usr/pkg/bin/python3.7 /usr/pkg/bin/python3
  480. # pkgin install py37-scons
  481. # pkgin install ncurses
  482. # pkgin install openssl mozilla-rootcerts
  483. # mozilla-rootcerts install
  484. # pkgin install git
  485. # git clone https://gitlab.com/gpsd/gpsd.git
  486. # cd gpsd
  487. # scons --config=force && scons install
  488. --------------------------------------------------------------
  489. === Special Notes for OpenBSD 6.6 Installation
  490. gpsd will build, install and run on NetBSD.
  491. All you need for a basic gpsd install is scons and git. Then
  492. create the missing python link.
  493. --------------------------------------------------------------
  494. # pkg_add scons
  495. # pkg_add git
  496. # ln -s /usr/local/bin/python2 /usr/local/bin/python
  497. --------------------------------------------------------------
  498. Then install the normal way.
  499. --------------------------------------------------------------
  500. # git clone https://gitlab.com/gpsd/gpsd.git
  501. # cd gpsd
  502. # scons --config=force && scons install
  503. --------------------------------------------------------------
  504. == Special Notes for Fedora derivatives
  505. === Special Notes for CentOS 7 Installation
  506. gpsd currently will build, install and run on CentOS 7.
  507. Install the gcc compiler and tools. Install EPEL.
  508. Note: there is no EPEL for i386.
  509. Use the yum command to install git if you
  510. want to access the development source.
  511. --------------------------------------------------------------
  512. # yum group install "Development Tools"
  513. # yum install git
  514. # yum install \
  515. https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  516. # yum install scons
  517. # yum install python-devel
  518. # yum install ncurses-devel
  519. # yum install pps-tools-devel
  520. # git clone https://gitlab.com/gpsd/gpsd.git
  521. # cd gpsd
  522. # scons
  523. --------------------------------------------------------------
  524. == Special Notes for Windows
  525. Only Windows Subsystem for Linux 1 provides a reasonable means
  526. of running gpsd at this time. WSL2 lacks a GUI, USB and serial
  527. support making it unsuitable at this time.
  528. === About WSL 1
  529. WSL 1 is a component of Microsoft
  530. Windows that implements an alternate kernel. Linux
  531. distributions, notably Alpine, Debian, Kali, OpenSUSE, and
  532. Ubuntu may run on top of it.
  533. There are some issues known which affect gpsd.
  534. * /dev/ttyS* nodes have a 1 indexed number, like in MS Windows.
  535. * Windows 10 may attempt to use your GPS itself.
  536. * Older pl2303 (knockoff) serial chipsets are no longer supported \
  537. in Windows 10
  538. === Installing a Linux distribution on WSL 1 or WSL 2
  539. 1. Install a Linux distribution by clicking on the `Microsoft Store` \
  540. Icon in the taskbar.
  541. 2. Click on the search icon (it is a magnifying glass).
  542. 3. Type in 'Linux' or the name of a supported distribution. (see list)
  543. 4. Click on the icon of your chosen Linux Distribution
  544. 5. Click 'Get' then click 'Install' and busy-wait.
  545. 6. Click on the start menu and scroll to your Linux distribution and \
  546. click it.
  547. 7. Follow the distribution-specific on-screen instructions to finish \
  548. installing your Linux distribution.
  549. === Recommended packages
  550. Due to current WSL limitations, it is recommended at this time that you
  551. only install the equivalent of the following packages on your distribution.
  552. ----
  553. Python
  554. SCons (preferably 3.0+)
  555. ncurses-dev (to build/run cgps and gpsmon)
  556. asciidoctor (to build the documentation)
  557. xmlto (to build the man pages)
  558. ----
  559. Optionally, the following packages might also be installed
  560. ----
  561. pyserial (for direct control of UBlox GPS and GREIS devices)
  562. gnuplot (to generate graphs of gpsprof data)
  563. libusb-dev (to possibly use crusty old Garmin GPS receivers)
  564. git (if building from the development sources)
  565. ----
  566. === Building on WSL 1 or WSL 2
  567. 1. Get the list of packages from the appropriate section above.
  568. 2. Follow instructions in the distro-specific section above.