SUMOのインストールが問題 on Ubuntu
目次
障害
aptでsumoをインストールしようとする。すると、こんなエラーメッセージが出てしまう。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
$ sudo apt install sumo [sudo] password for kensuke-mi: Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: sumo : Depends: gdal-abi-2-2-3 E: Unable to correct problems, you have held broken packages. |
しかし、gdal-abi-2-2-3というパッケージはaptに存在していない。さて、どうしようか?
正解: fakeパッケージ
いろいろと方法を試してみた。正解だったのは、fakeパッケージを作成して、真のパッケージへの参照情報を紹介することだった。
次の手順を実行してみる。
1 2 3 4 5 6 |
vim gdal_abi.txt sudo apt install equivs sudo equivs-build gdal_abi.txt sudo dpkg -i gdal-abi-2-2-3_2.2.3_all.deb sudo dpkg -i gdal_abi.txt sudo apt install sumo |
gdal_abi.txtの中身はこの通り
1 2 3 4 5 6 7 8 |
Section: misc Priority: optional Standards-Version: 3.9.2 Package: gdal-abi-2-2-3 Version: 2.2.3 Depends: libgdal20 Description: fake package for qgis which needs a gdal-abi-2-2-3 |
SUMOのバージョン確認をしてみる。インストールは成功した様子だ。
1 2 3 4 5 6 7 8 9 10 11 |
(base) kensuke-mi@kensukemi-UX430UNR:~/Desktop/abi-tmp$ sumo --version Eclipse SUMO sumo Version 1.8.0 Build features: Linux-4.15.0-124-generic x86_64 GNU 7.5.0 Release Proj GUI SWIG GDAL GL2PS Copyright (C) 2001-2020 German Aerospace Center (DLR) and others; https://sumo.dlr.de Eclipse SUMO sumo Version 1.8.0 is part of SUMO. This program and the accompanying materials are made available under the terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v20.html SPDX-License-Identifier: EPL-2.0 |
結局なんだったのか?
gdal-abi-2-2-3は何だろう?

Virtual Packageらしい。Virtual Packageってなんだろう?たしかに、aptitudeコマンドを実行したときもVirtual Packageのエラーメッセージが出ていた。
Virtual Packageとは次の定義。

つまり、gdal-abi-2-2-3とlibgdal20は同じと言える。
ひとつの仮説が出る。SUMOの依存関係が狂っているのではないか?SUMOのマニュアルに従って、レポジトリ設定を試してみる。

参考
aptで似たような問題が起きたとき、もしかしたらこの解決法が役に立つかもしれない。
ディスカッション
コメント一覧
まだ、コメントがありません