This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux: Unable to install packages in BeagleBoneBlack

Tool/software: Linux

Hi,

I am using BeagleBoneBlack with Wireless Connectivity Cape. I want to install Shairport Sync in the target board. For that, I connected my board with the LAN for internet connection (Private network only not corporate network). Then, I tried the following link:

https://github.com/mikebrady/shairport-sync   

But, I could not execute the apt-get command in BBB. So, I used opkg command. 

#opkg update 

The output of this command is as follows:

root@am335x-evm:~# opkg update
Downloading lcpd.gt.design.ti.com/.../Packages.gz.
wget: bad address 'lcpd.gt.design.ti.com'
Downloading lcpd.gt.design.ti.com/.../Packages.gz.
wget: bad address 'lcpd.gt.design.ti.com'
Downloading lcpd.gt.design.ti.com/.../Packages.gz.
wget: bad address 'lcpd.gt.design.ti.com'
Downloading lcpd.gt.design.ti.com/.../Packages.gz.
wget: bad address 'lcpd.gt.design.ti.com'
Downloading lcpd.gt.design.ti.com/.../Packages.gz.
wget: bad address 'lcpd.gt.design.ti.com'
Downloading lcpd.gt.design.ti.com/.../Packages.gz.
wget: bad address 'lcpd.gt.design.ti.com'
Downloading lcpd.gt.design.ti.com/.../Packages.gz.
wget: bad address 'lcpd.gt.design.ti.com'
Downloading lcpd.gt.design.ti.com/.../Packages.gz.
wget: bad address 'lcpd.gt.design.ti.com'
Downloading lcpd.gt.design.ti.com/packages/arago-morty/prod/armv6thf-vfp/Packages.gz.
wget: bad address 'lcpd.gt.design.ti.com'
Downloading lcpd.gt.design.ti.com/.../Packages.gz.
wget: bad address 'lcpd.gt.design.ti.com'
Downloading lcpd.gt.design.ti.com/.../Packages.gz.
wget: bad address 'lcpd.gt.design.ti.com'
Downloading lcpd.gt.design.ti.com/.../Packages.gz.
wget: bad address 'lcpd.gt.design.ti.com'
Downloading lcpd.gt.design.ti.com/.../Packages.gz.
wget: bad address 'lcpd.gt.design.ti.com'
Downloading lcpd.gt.design.ti.com/.../Packages.gz.
wget: bad address 'lcpd.gt.design.ti.com'
Collected errors:
* opkg_download_backend: Failed to download lcpd.gt.design.ti.com/.../Packages.gz, wget returned 1.
* opkg_download_backend: Failed to download lcpd.gt.design.ti.com/.../Packages.gz, wget returned 1.
* opkg_download_backend: Failed to download lcpd.gt.design.ti.com/.../Packages.gz, wget returned 1.
* opkg_download_backend: Failed to download lcpd.gt.design.ti.com/.../Packages.gz, wget returned 1.
* opkg_download_backend: Failed to download lcpd.gt.design.ti.com/.../Packages.gz, wget returned 1.
* opkg_download_backend: Failed to download lcpd.gt.design.ti.com/.../Packages.gz, wget returned 1.
* opkg_download_backend: Failed to download lcpd.gt.design.ti.com/.../Packages.gz, wget returned 1.
* opkg_download_backend: Failed to download lcpd.gt.design.ti.com/.../Packages.gz, wget returned 1.
* opkg_download_backend: Failed to download lcpd.gt.design.ti.com/.../Packages.gz, wget returned 1.
* opkg_download_backend: Failed to download lcpd.gt.design.ti.com/.../Packages.gz, wget returned 1.
* opkg_download_backend: Failed to download lcpd.gt.design.ti.com/.../Packages.gz, wget returned 1.
* opkg_download_backend: Failed to download lcpd.gt.design.ti.com/.../Packages.gz, wget returned 1.
* opkg_download_backend: Failed to download lcpd.gt.design.ti.com/.../Packages.gz, wget returned 1.
* opkg_download_backend: Failed to download lcpd.gt.design.ti.com/.../Packages.gz, wget returned 1.
root@am335x-evm:~# lcpd.gt.design.ti.com/.../Packages.gz
sh: lcpd.gt.design.ti.com/.../Packages.gz: No such file or directory

When I tried to download some package from github, I can able to download successfully. So. I think so Internet connection is not a problem.

My query is, Can I use opkg to install packages in BBB device? If I can, How can I use opkg command to install new packages? OR

Is there any other ways to install packages in BBB?

Thanks in advance

Manimekala Rajendran

  • Hi Manimekala,

    I am not sure if opkg can be used. In some places I read you can only use apt-get. So, not sure.
    But, on the other hand, the shairport-sync documentation looks clean and you can cross compile it for BBB in your host PC and install the binaries on the BBB.

    Meanwhile, I will check if can install shairport-sync directly on BBB using debain based packages.
    Let me know your observations.

    Thanks,
    Prabhuraj
    BlackPepper Technologies
  • Hi Prabhuraj,

    Thanks for your prompt reply.

    Could you please let me how exactly do we specify that we need to cross-compile the code for some target and not compile it for the host machine?

    Thanks & Regards,

    Manimekala R

  • Hi Manimekala,

    You can go through the github documentation in the sharepoint-sync source which will give you guideline to cross compile.
    In short, from your sharepoint-sync dir, run,
    1) autoreconf -i -f : This will generate INSTALL doc and configure script along with few others. refer INSTALL doc for compilation.
    2) Install the dependencies in your host PC (I assume you have 14.04 ubuntu)
    The following libraries are required:

    OpenSSL or mbed TLS (PolarSSL is supported but deprecated)
    Avahi
    ALSA and/or PulseAudio
    libdaemon
    autoconf
    automake
    libtool
    libpopt
    libconfig
    Optional:

    libsoxr
    libalac (This is a library containing the Apple ALAC decoder.)

    3) ./configure --host=x86 --target=ARM CC=arm-linux-gnueabihf-gcc --sysconfdir=/etc --with-alsa --with-pa --with-avahi --with-ssl=openssl --with-metadata --with-soxr
    This will configure you host and target with standard build options for sharepoint-sync
    4) make
    5) make install < in yur target dir>

    While running above steps, you may face issues. Please go through INSTALL doc, which will give you more details.

    Thanks,
    Prabhuraj
    BlackPepper Technologies
  • Hi Prabhuraj,

    Thank you very much for replies. As you suggested, I tried to cross compile the shairport-sync in the ubuntu platform (ubuntu 16.04). I configured shairport-sync by using following parameters:

    $./configure - - build=x86_64-linux-gnu - -host=x86_64  - -target=armv71 CC=arm-linux-gnueabi-gcc --sysconfdir=/etc --with-alsa --with-pa --with-tinysvcmdns --with-ssl=openssl --with-metadata --with-systemd DAEMON_LIBS=-lpthread

    I have attached the log file of the configuration. 

    After that, I have executed ‘make’ command for building the Shairport-sync package. When I am executing this, I am getting  the following errors:

    $ make

    make  all-recursive

    make[1]: Entering directory '/home/praveen/shairport-sync'

    Making all in man

    make[2]: Entering directory '/home/praveen/shairport-sync/man'

    make[2]: Nothing to be done for 'all'.

    make[2]: Leaving directory '/home/praveen/shairport-sync/man'

    make[2]: Entering directory '/home/praveen/shairport-sync'

    g++  -g -O2   -o shairport-sync shairport.o rtsp.o mdns.o mdns_external.o common.o rtp.o player.o alac.o audio.o loudness.o   mdns_tinysvcmdns.o tinysvcmdns.o audio_alsa.o        audio_pa.o    -lpulse -lasound -lssl -lcrypto -lconfig -lpopt -lm -lpthread -lpthread -lrt

    /usr/bin/ld: shairport.o: Relocations in generic ELF (EM: 40)

    /usr/bin/ld: shairport.o: Relocations in generic ELF (EM: 40)

    /usr/bin/ld: shairport.o: Relocations in generic ELF (EM: 40)

    /usr/bin/ld: shairport.o: Relocations in generic ELF (EM: 40)

    /usr/bin/ld: shairport.o: Relocations in generic ELF (EM: 40)

    /usr/bin/ld: shairport.o: Relocations in generic ELF (EM: 40)

    /usr/bin/ld: shairport.o: Relocations in generic ELF (EM: 40)

    /usr/bin/ld: shairport.o: Relocations in generic ELF (EM: 40)

    shairport.o: error adding symbols: File in wrong format

    collect2: error: ld returned 1 exit status

    Makefile:539: recipe for target 'shairport-sync' failed

    make[2]: *** [shairport-sync] Error 1

    make[2]: Leaving directory '/home/praveen/shairport-sync'

    Makefile:617: recipe for target 'all-recursive' failed

    make[1]: *** [all-recursive] Error 1

    make[1]: Leaving directory '/home/praveen/shairport-sync'

    Makefile:425: recipe for target 'all' failed

    make: *** [all] Error 2

    Note:- I am booting Beaglebone black from SD card.

    Can you please suggest me any solution to solve the above issue?

    Thanks & Regards,

    Manimekala.R

    2084.configuration_terminal_op.txt

  • Hi,
    I have ubuntu 14.04. I cannot test it because I am getting pthread dependency.
    Have a look at the below link and see if it helps you.
    stackoverflow.com/.../relocations-in-generic-elf-em-40

    thanks,
    Prabhuraj
    BlackPepper Technologies
  • Hi,
    Thank you very much for all your prompt replies.
    I got this error because of all the available libraries in ubuntu plaform (where I cross compiled) are for 64-bit system but I cross compiled for 32-bit system. I solved the issue by following way:
    I copied all the libraries such as lpulse,lasound,lconfig and lpopt from my SD card which I used to boot my board and placed inside my own directory named (Xcompile_libs) and change the configuration command as follows:

    $./configure - - build=x86_64-linux-gnu - -host=x86_64 - -target=armv71 CC=arm-linux-gnueabi-gcc --sysconfdir=/etc --with-alsa --with-pa --with-tinysvcmdns --with-ssl=openssl --with-metadata --with-systemd LDFLAGS=-L/home/username/Xcompile_libs

    Now it is configured without any error...