x64 Ubuntuにarm用libudevをインストールする

x64 Ubuntuにarm用libudevをインストールする

arm-linux-gnueabihf-g++x64 Ubuntuでソフトウェアをクロスコンパイルしようとしています。インストールのために次の手順を試しましたlibudev:armhf

sudo dpkg --add-architecture armhf

この2行/etc/apt/sources.list

deb [arch=amd64,i386] http://uk.archive.ubuntu.com/ubuntu/ trusty main universe
deb [arch=armel,armhf] http://ports.ubuntu.com/ubuntu-ports trusty main universe`

それから私は以下を実行しました。

sudo apt-get update

私には、次のエラーが発生します。

W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/trusty/Release  Unable to find expected entry 'main/binary-armel/Packages' in Release file (Wrong sources.list entry or malformed file)
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/main/binary-armhf/Packages  404  Not Found [IP: 91.189.88.162 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/universe/binary-armhf/Packages  404  Not Found [IP: 91.189.88.162 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-armhf/Packages  404  Not Found [IP: 91.189.88.161 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/restricted/binary-armhf/Packages  404  Not Found [IP: 91.189.88.161 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/binary-armhf/Packages  404  Not Found [IP: 91.189.88.161 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/multiverse/binary-armhf/Packages  404  Not Found [IP: 91.189.88.161 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-backports/main/binary-armhf/Packages  404  Not Found [IP: 91.189.88.161 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-backports/restricted/binary-armhf/Packages  404  Not Found [IP: 91.189.88.161 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-backports/universe/binary-armhf/Packages  404  Not Found [IP: 91.189.88.161 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-backports/multiverse/binary-armhf/Packages  404  Not Found [IP: 91.189.88.161 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/main/binary-armhf/Packages  404  Not Found [IP: 91.189.88.161 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/restricted/binary-armhf/Packages  404  Not Found [IP: 91.189.88.161 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/universe/binary-armhf/Packages  404  Not Found [IP: 91.189.88.161 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/multiverse/binary-armhf/Packages  404  Not Found [IP: 91.189.88.161 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

しようとすると手にsudo apt-get install libudev-dev:armhf入る

The following packages have unmet dependencies:


   libudev-dev:armhf : Depends: libudev1:armhf (= 204-5ubuntu20) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

sudo apt-cache policy libudev1:{amd64,armhf}与えられた

libudev1:
  Installed: 204-5ubuntu20.20
  Candidate: 204-5ubuntu20.20
  Version table:
 *** 204-5ubuntu20.20 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     204-5ubuntu20 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        500 http://uk.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
libudev1:armhf:
  Installed: (none)
  Candidate: 204-5ubuntu20
  Version table:
     204-5ubuntu20 0
        500 http://ports.ubuntu.com/ubuntu-ports/ trusty/main armhf Packages

クロスコンパイルのためにarmhfをシステムに追加するには?

ベストアンサー1

これには2つの問題があります。

まず、ダウンロード中に表示される警告を解決するには、資格が必要です。みんなの非ポートエントリと/etc/apt/sources.listファイル。/etc/apt/sources.list.d[arch=amd64,i386]

libudev1第二に、マルチアーキテクチャパッケージはすべてのアーキテクチャに同じバージョンをインストールする必要があるため、現在の設定でインストールすることはできません。 ubuntu20.20に204-5ubuntu20.20をインストールしましたが、amd64そのバージョンは設定したリポジトリでは利用できません。 forのパッケージをインストールするには、forも追加する必要がarmhfあります。trusty-updatesarmhf

deb [arch=armel,armhf] http://ports.ubuntu.com/ubuntu-ports trusty-updates main universe

おすすめ記事