LoginSignup
2
0

More than 5 years have passed since last update.

gpsd起動時にエラーが発生した時の対処法

Last updated at Posted at 2018-04-26

GPSを搭載したRaspberry Piでgpsdの起動がエラーとなった時の対応メモです。

エラー内容

# systemctl start gpsd
A dependency job for gpsd.service failed. See 'journalctl -xe' for details.

# systemctl status gpsd
● gpsd.service - GPS (Global Positioning System) Daemon
   Loaded: loaded (/lib/systemd/system/gpsd.service; indirect; vendor preset: enabled)
   Active: inactive (dead)

# journalctl -xe

-- Subject: Unit gpsd.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit gpsd.service has failed.
--
-- The result is dependency.
Apr 26 22:11:01 raspberrypi systemd[1]: gpsd.service: Job gpsd.service/start failed with result 'dependency'.
Apr 26 22:11:07 raspberrypi systemd[1]: gpsd.socket: Failed to listen on sockets: Cannot assign requested addres
Apr 26 22:11:07 raspberrypi systemd[1]: Failed to listen on GPS (Global Positioning System) Daemon Sockets.
-- Subject: Unit gpsd.socket has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit gpsd.socket has failed.
--
-- The result is failed.

ソケットの生成がエラーとなっていました。

原因

IPv6を無効にしていたことが原因でした。(使わないかと思いまして・・・)

まず下記の通り、IPv6設定を有効にしてOSを再起動します。

# vim /etc/sysctl.conf

#net.ipv6.conf.all.disable_ipv6 = 1
#net.ipv6.conf.default.disable_ipv6 = 1

# reboot

OS起動後にgpsdが起動できることを確認出来ました。

# systemctl start gpsd

# systemctl status gpsd
● gpsd.service - GPS (Global Positioning System) Daemon
   Loaded: loaded (/lib/systemd/system/gpsd.service; indirect; vendor preset: enabled)
   Active: active (running) since Thu 2018-04-26 22:14:48 JST; 1s ago
 Main PID: 830 (gpsd)
   CGroup: /system.slice/gpsd.service
           └─830 /usr/sbin/gpsd -N /dev/serial0

Apr 26 22:14:48 raspberrypi systemd[1]: Started GPS (Global Positioning System) Daemon.
2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0