arm-linux-gnueabihf-g++
x64 Ubuntu에서 소프트웨어를 크로스 컴파일하려고 합니다. 설치를 위해 다음 단계를 시도했습니다 libudev:armhf
.
sudo dpkg --add-architecture armhf
이 두 줄을/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
여기에는 두 가지 문제가 있습니다.
먼저, 다운로드하는 동안 나타나는 경고를 해결하려면 자격을 갖추어야 합니다.모두의 비포트 항목과 /etc/apt/sources.list
파일./etc/apt/sources.list.d
[arch=amd64,i386]
libudev1
둘째, 다중 아키텍처 패키지는 모든 아키텍처에 동일한 버전을 설치해야 하기 때문에 현재 설정으로 설치할 수 없습니다 . ubuntu20.20 에 204-5ubuntu20.20 을 설치했지만 amd64
해당 버전은 구성한 저장소에서 사용할 수 없습니다. for의 패키지를 설치하려면 for armhf
도 추가해야 합니다 .trusty-updates
armhf
deb [arch=armel,armhf] http://ports.ubuntu.com/ubuntu-ports trusty-updates main universe
답변2
왜 우분투 포트가 필요한가요? trusty의 공식 아카이브에는 armhf가 있는 것 같습니다. 다음을 참조하세요.https://launchpad.net/ubuntu/+source/systemd/204-5ubuntu20.20
/etc/apt/sources.list
추가한 줄을 제거 하고 다시 시도하는 것이 좋습니다