我正在關注this教程,將Adafruit的Ultimate GPS Breakout與我的Raspberry Pi 2掛鉤。我仔細閱讀了每一步。Raspberry Pi 2 GPSD未運行
當我運行gpsmon /dev/ttyUSB0
時,它顯示預期的輸出與我的位置,速度等。但是,當我運行cgps -s
時,我收到此消息cgps: no gpsd running or network error: -4, can't create socket
。
真的很奇怪的是GPSD似乎失敗了。下面是我嘗試啓動它:
[email protected]:~$ sudo service gpsd status
[FAIL] gpsd is not running ... failed!
[email protected]:~$ sudo service gpsd restart
[ ok ] Restarting GPS (Global Positioning System) daemon: gpsd.
[email protected]:~$ sudo service gpsd status
[FAIL] gpsd is not running ... failed!
[email protected]:~$ sudo service gpsd start
[email protected]:~$ sudo service gpsd status
[FAIL] gpsd is not running ... failed!
所以,很明顯,cgps
失敗,因爲GPSD是不是首發。任何建議讓GPSD工作?
編輯 當我運行sudo gpsd -N -D3 -F /var/run/gpsd.sock
,我得到這樣的輸出:
gpsd:INFO: launching (Version 3.6)
gpsd:ERROR: can't bind to IPv4 port gpsd, Cannot assign requested address
gpsd:ERROR: can't create IPv6 socket
gpsd:DATA: command sockets creation failed, netlib errors -1, -1
嘗試將gpsd作爲可執行文件運行而不是作爲服務運行,並查看會發生什麼情況。 – recantha