LoginSignup
6
4

Jetson Jetpack4.6をubuntu20.04にアプデする

Last updated at Posted at 2021-09-30

Jetsonでubuntu20.04が使いたい!!

Jetsonで利用できるシステムイメージは最新のJetPack4.6でもUbutnu18がベースですがUbuntu20をサポートしているROS2を使いたいのでちょっと無理して20.04にアップグレードしました.
本記事はUpgrade NVIDIA Jetson Nano from Ubuntu Bionic Beaver to Focal Fossaを参考にして実際にインストールに成功した手順の備忘録です.

注意:この方法ではアップデート後に一部パッケージでエラーが出ます
自分の環境では該当パッケージを再インストールで解決しましたが,予期せぬところでエラーが出るかもしれないので特段の理由がない限り18.04で使う方が良いかもです.

→ スリープから復帰できない...?suspendを無効にすればほぼ問題ないといえばないですが,間違えてスリープしてしまった時はカーネルは死んでないのでhttp://kurumatorajirou.blogspot.com/2013/02/ubuntu-ubuntu.html
などで紹介されている方法で強制再起動で対応.

環境

  • Jetson Nano 4GB
  • JetPack 4,6(Ubuntu18.04)

アップデートしていく

お約束のやつ

$ sudo apt update
$ sudo apt upgrade -y

アップデート用のパッケージをインストール

$ sudo apt install fwupd fwupdate fwupdate-signed -y

未使用のパッケージを削除&再起動

$ sudo apt autoremove -y
$ sudo systemctl reboot

/etc/update-manager/release-upgrades内でアップデートが無効設定になってるのでvimとかで管理者権限で開いて
update = Never をNormalに変更

$ sudo vim /etc/update-manager/release-upgrades

アップデート用のパッケージを準備?

$ sudo do-release-upgrade

途中で出る選択肢は基本Y(yes:アップデートする)

Configuration file '/etc/systemd/resolved.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** resolved.conf (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/systemd/resolved.conf ...

Configuration file '/etc/systemd/sleep.conf'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** sleep.conf (Y/I/N/O/D/Z) [default=N] ? Y

上記のアップデートはChromium系が悪さをして動作しないため対処

$ sudo apt-get remove --purge chromium-browser chromium-browser-l10n
$ sudo apt autoremove
$ sudo apt --fix-broken install

残っているパッケージのアップグレード

$ sudo apt upgrade -y

libopencv-dev系が悪さをしてうまくいかないのでパージする.

$ sudo dpkg --purge --force-all libopencv-dev
#Clear the local repository of retrieved package files:
$ apt-get clean
$ sudo apt --fix-broken install #エラー出るはず.以下で対処.

lipopencv-devをpurgeしてもopencv-licensesが残っておりfix-broken installで競合するので対処して再実行.
参考:https://askubuntu.com/questions/176121/dpkg-error-trying-to-overwrite-file-which-is-also-in

$ sudo dpkg -P opencv-licenses
$ sudo apt --fix-broken install

アップグレードできるパッケージを検索

$ apt list --upgradable

Orcaが出てくるはずなのでアプデ

$ sudo apt install orca -y
$ sudo apt autoremove
$ sudo systemctl reboot

アプデ完了!
以下のコマンドでOSが最新になっているか確認できる.

$ uname -a

アプデ後のエラー

途中でlibopencv-dev系をパージしてfixしたりしてたのが悪いっぽいですが,アプデ後はopencv系でCrash Reportの警告が何度か出ます.(libopencv-imgprocとか).
内容としてはインストールに失敗したって事らしいですがapt list --installedでは一通りインストール済みなのでよくわからない.
とりあえず再インストールしたら警告は出なくなったのでヨシ!

matome

Ubuntu20.04がデフォなJetPack5は2023年らしいのでBionicちゃんとのお付き合いはまだ暫く続きそうです(´;ω;`)ウゥゥ

6
4
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
6
4