Armadilloフォーラム

Eclipse IDEを使ったリモートデバッグを実行するための準備について

keiko-502

2023年8月25日 12時00分

以下のブログを参考に,Eclipse IDEを使用してリモートデバッグを行うための準備を進めています。
https://armadillo.atmark-techno.com/blog/8700/3922

前準備に記載されている,「Windows Subsystem for LinuxにArmadillo開発環境を構築するための手順」を確認しながら進めているのですが,
クロス開発環境のインストールで不明な部分がありましたので質問させて頂きたいと思います。

ブログ(https://armadillo.atmark-techno.com/blog/8700/3542)の「3. クロス開発環境のインストール」に記載されている手順に従い,進めておりましたが,
「4. アットマークテクノが公開しているGPG鍵を取得します。」で,以下のように表示されました。

keiko@DESKTOP-NKPBQ8E:~$ sudo apt-key adv --keyserver pgp.nic.ad.jp --recv-keys 3874DA771B351757
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.dsn5BoRGEn/gpg.1.sh --keyserver pgp.nic.ad.jp --recv-keys 3874DA771B351757
gpg: keyserver receive failed: Connection timed out

最後の行にある,timed outがエラーのように思えるので,「5. Armadillo用ソースリストが正常に作成できたか確認します。何らかのエラーが発生した場合は、手順3と4を再度確認して下さい。」にあるように,手順3,4を再度実施してみましたが,同様に表示されます。

この表示(timed out)はエラーなのか,正常な場合,どう表示されるのかご教授いただきたいと思いますのでよろしくお願いいたします。

コメント

at_syunya.ohshio

2023年8月28日 10時50分

大塩です。

> keiko@DESKTOP-NKPBQ8E:~$ sudo apt-key adv --keyserver pgp.nic.ad.jp --recv-keys 3874DA771B351757
> Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
> Executing: /tmp/apt-key-gpghome.dsn5BoRGEn/gpg.1.sh --keyserver pgp.nic.ad.jp --recv-keys 3874DA771B351757
> gpg: keyserver receive failed: Connection timed out

GPG鍵の取得でtimeout しておりますので、これは鍵取得に失敗しています。
以下フォーラムで記載されているように、--keyserver を変更して試してみてください。
https://armadillo.atmark-techno.com/forum/armadillo/13113

以上です。

keiko-502

2023年8月29日 16時43分

大塩様

お世話になっております。
ご提示いただいたフォーラムを参考に,鍵取得を行いました。
以下のように表示されましたが,鍵取得に成功しているのでしょうか?
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.nLwLHHEmoI/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 3874DA771B351757
gpg: key 3874DA771B351757: public key "Atmark Techno, Inc. (atde release)" imported
gpg: Total number processed: 1
gpg: imported: 1

また,次の工程で,「6. Armadillo用のクロス開発環境一式をインストールします。」とあり,コマンド「sudo apt-get install x1-essential」を入力したところ,
以下のように表示されました。
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package x1-essential

こちらは成功しているのでしょうか?

at_syunya.ohshio

2023年8月29日 17時38分

大塩です。

> ご提示いただいたフォーラムを参考に,鍵取得を行いました。
> 以下のように表示されましたが,鍵取得に成功しているのでしょうか?
> Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
> Executing: /tmp/apt-key-gpghome.nLwLHHEmoI/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 3874DA771B351757
> gpg: key 3874DA771B351757: public key "Atmark Techno, Inc. (atde release)" imported
> gpg: Total number processed: 1
> gpg: imported: 1

エラーは出ておりませんので、おそらくこれで取得できているはずです。

> また,次の工程で,「6. Armadillo用のクロス開発環境一式をインストールします。」とあり,コマンド「sudo apt-get install x1-essential」を入力したところ,
> 以下のように表示されました。
> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> E: Unable to locate package x1-essential

上記、必要なx1-essentialが見つからないエラーとなっています。
apt-get update 、apt-get upgrade で http://download.atmark-techno.com/debian/ は正常に見えているでしょうか。

以下コマンドからも確認ができると思います。
apt-cache search x1-essential

以上です。

keiko-502

2023年8月29日 18時00分

大塩様

お世話になっております。

apt-get update 、apt-get upgradeの結果は以下のとおりでした。
【apt-get update】
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)

【apt-get upgrade】
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

また,apt-cache search x1-essentialですが,実行しても何も表示されません。

どこかの作業でうまくいっていない作業があるのでしょうか。

at_syunya.ohshio

2023年8月29日 18時18分

大塩です。

> apt-get update 、apt-get upgradeの結果は以下のとおりでした。
> 【apt-get update】
> E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
> E: Unable to lock directory /var/lib/apt/lists/
> W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
> W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)

このエラーは apt-get update コマンド実行時の権限がないことで発生します。
コマンドにsudo を付けることで管理者権限でコマンドを実行できますので、お試しください。
sudo apt-get update

keiko-502

2023年8月30日 9時00分

大塩様

お世話になっております。
sudoをつけてapt-get update ,apt-get upgrade実施後,再度,コマンド「sudo apt-get install x1-essential」を入力したところ,
以下のように表示されました。
Reading package lists... Done
Building dependency tree... Done
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:
x1-essential : Depends: python but it is not installable
E: Unable to correct problems, you have held broken packages.

インストールできなかったようなのですが,このメッセージの原因は何でしょうか。

at_syunya.ohshio

2023年8月30日 10時34分

大塩です。

sudo によりupdate, upgrade は成功しているようで何よりです。

> Reading package lists... Done
> Building dependency tree... Done
> 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:
> x1-essential : Depends: python but it is not installable
> E: Unable to correct problems, you have held broken packages.

記載されている内容を読むと、依存関係のpython がインストールされていないことによるエラーと記載されていますので
x1-essential インストール前に python をインストールしてください。

keiko-502

2023年8月31日 11時54分

大塩様

お世話になっております。

pythonのインストールが必要とのことで,コマンド「sudo apt-get install python」を試したところ,以下メッセージが表示されました。
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python-is-python3 2to3

E: Package 'python' has no installation candidate

pythonパッケージが見つからない?ようなので,python3をインストールして,再度x1-essential インストールを試みましたが,同じメッセージが表示されました。

何か不足している作業や確認するものがあれば教えていただきたいと思いますのでよろしくお願いいたします。

at_syunya.ohshio

2023年8月31日 13時48分

大塩です。

> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> Package python is not available, but is referred to by another package.
> This may mean that the package is missing, has been obsoleted, or
> is only available from another source
> However the following packages replace it:
> python-is-python3 2to3
>
> E: Package 'python' has no installation candidate

python (以下 python2.7 と記載)と python3 は違うパッケージであり、x1-essential は python 2.7 を必要としているためpython3 をインストールしても依存関係は解消されません。
WindowsからダウンロードしたDebian のバージョンによっては、python2.7 がリストから除外されているかもしれません。
Debianバージョンを確認する場合は、「cat /etc/issue」 or 「cat /etc/debian_version」でご確認いただけます。
また念の為、/etc/apt/sources.list が存在するか確認し、存在する場合は内容を記載いただけますでしょうか。

現在の状態では、python 2.7 をaptからインストールできないため、以下の方法が考えられます。
・python のサイトから python 2.7 の最新版をダウンロードし、手動でインストールする

以上です。

keiko-502

2023年9月1日 10時33分

大塩様

お世話になっております。

python2.7が必要とのことで承知いたしました。

取り急ぎ,Debianバージョンの確認結果をお送りします。

「cat /etc/issue」
Debian GNU/Linux 12 \n \l

「cat /etc/debian_version」
12.1

また,「/etc/apt/sources.list」を確認し,sources.listが存在しましたので内容をお送りします。
「cat /etc/apt/sources.list」で確認したものになります。
deb http://deb.debian.org/debian bookworm main
deb http://deb.debian.org/debian bookworm-updates main
deb http://security.debian.org/debian-security bookworm-security main
deb http://ftp.debian.org/debian bookworm-backports main

以上,よろしくお願いいたします。

at_syunya.ohshio

2023年9月1日 15時01分

大塩です。

情報ありがとうございます。

> 「cat /etc/issue」
> Debian GNU/Linux 12 \n \l
>
> 「cat /etc/debian_version」
> 12.1
>
> また,「/etc/apt/sources.list」を確認し,sources.listが存在しましたので内容をお送りします。
> 「cat /etc/apt/sources.list」で確認したものになります。
> deb http://deb.debian.org/debian bookworm main
> deb http://deb.debian.org/debian bookworm-updates main
> deb http://security.debian.org/debian-security bookworm-security main
> deb http://ftp.debian.org/debian bookworm-backports main

バージョンがDebian 12 であること、了解しました。

x1-essential はArmadillo用のクロス開発環境に必要なパッケージを纏めてインストールしてくれるパッケージになっておりますので、
Debian 12 の apt list に存在しない python 2.7 以外を手動インストールしていただくことで、開発環境は揃います。

以下がx1-essential でインストールされる python 以外のパッケージ群になっておりますので、こちらをapt-get してみてください。

u-boot-tools, build-essential, gcc-arm-linux-gnueabihf,git,liblz4-tool, debhelper, bc, device-tree-compiler, dpkg-dev, skales, libfdt-dev, libncurses5-dev, libncursesw5-dev, lzop, firmware-atheros, firmware-ti-connectivity, dosfstools, firmware-bcmdhd

keiko-502

2023年9月4日 10時46分

大塩様

お世話になっております。

ご提示いただいた各パッケージについて,それぞれ「sudo apt-get ○○」を実行しましたが,「E: Invalid operation ○○」のように表示され,apt-getできませんでした。

原因やほかの方法,確認事項等があれば教えていただきたいと思いますのでよろしくお願いいたします。

at_syunya.ohshio

2023年9月5日 11時14分

大塩です。

ご確認ありがとうございます。
各パッケージについて、「apt search」コマンドでパッケージが存在するかご確認いただけますでしょうか。

またお手数ですがapt-get コマンド実行時の、コマンドから結果までのログをいただけますでしょうか。

以上です。

keiko-502

2023年9月5日 15時50分

大塩様

お世話になっております。
apt-getコマンド実行時のログは以下のように表示されています。
sudo apt-get u-boot-tools
E: Invalid operation u-boot-tools

「u-boot-tools」のみ記載しますが,ほかのパッケージについても同様でした。

また,「apt search」コマンドの実行結果について,表示量が多いのでファイルにさせていただきました。
添付ファイルをご確認いただきますようお願いいたします。

不足しているものがあればご連絡よろしくお願いいたします。

ファイル ファイルの説明
apt_search_ログ.zip

at_syunya.ohshio

2023年9月5日 16時07分

大塩です。

情報等ありがとうございます。

> sudo apt-get u-boot-tools
> E: Invalid operation u-boot-tools

上記、install が抜けております。
正しくは「sudo apt-get install u-boot-tools」となります。

ログを見ると、すべてsearch で存在が確認できますので、コマンドが正しければインストールは可能かと思われます。

以上です。

keiko-502

2023年9月5日 18時43分

大塩様

お世話になっております。

install を入れてコマンドを実行し,各パッケージをインストールすることができました。

次工程の「7. 開発環境が整ったら適当なプログラムをコンパイルして、Armadilloでの動作を確認して下さい。」のところですが,
記載の例にならって,「hello」を表示するプログラムをWSLの中で作成,コンパイルしたファイルをArmadilloに移動して実行するということで
よろしいでしょうか。

また,Armadilloで実行すると「./test: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.34' not found (required by ./test)」と表示されます。
Armadillo側でインストールするパッケージ等があるのでしょうか。