Instalando o libudev para arm no x64 Ubuntu

1

Estou tentando compilar um software usando arm-linux-gnueabihf-g++ no meu x64 Ubuntu. Eu tentei seguir os seguintes passos para instalar o libudev:armhf :

sudo dpkg --add-architecture armhf

Adicionadas estas duas linhas a /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'

Então eu corri:

sudo apt-get update

Isso me dá esse erro:

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.

Se eu tentar sudo apt-get install libudev-dev:armhf , obtenho

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

Como adicionarei o armhf ao meu sistema para fazer a compilação cruzada?

    
por Jishnu U Nair 09.12.2016 / 11:58

2 respostas

3

Existem dois problemas aqui.

Primeiro, para corrigir os avisos que você recebe nos downloads, é necessário qualificar todos as entradas sem portas em /etc/apt/sources.list e os arquivos em /etc/apt/sources.list.d com [arch=amd64,i386] .

Em segundo lugar, você não pode instalar o libudev1 com sua configuração atual porque os pacotes multiarch precisam ser instalados com a mesma versão em todas as arquiteturas. Você já tem 204-5ubuntu20.20 instalado em amd64 , mas essa versão não está disponível nos repositórios que você configurou. Para poder instalar o pacote para armhf , você precisa adicionar trusty-updates para armhf também:

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

Por que você precisa de portas do Ubuntu? trusty parece ter o armhf no arquivo oficial, veja: link

Sugiro remover as linhas adicionadas a /etc/apt/sources.list e tentar novamente

    
por 09.12.2016 / 13:24