Installing Opkg on Ubuntu

Short and sweet: Ubuntu + Opkg Docker image

Internet of wha?

If you’re dabbling with makerism, embedded software or the Internet of Things you may have come across the Opkg package manager.
Opkg is a fork of the abandoned ipkg which is a derivative of dpkg. Opkg archives and repository index are almost identical to Debian’s with only two main differences:

  1. Opkg files end with an .ipk suffix.
  2. Opkg files may be archived in either AR or TAR.GZ.

A world of PITA

The maintainers of Opkg don’t ship any pre-compiled binaries and although it’s based on Debian, installing the package manager on Ubuntu can be a PITA so here’s a recipe for you:

Installing the dependencies

Opkg is a needy bugger so the list of required dependencies to install is long:

noam@mandromeda:~$ sudo apt-get install -y gcc \
  pkg-config \
  libarchive13 \
  libarchive-dev \
  libcurl3 \
  libcurl3-dev \
  libgpgme11 \
  libgpgme11-dev \
  autogen \
  autoconf \
  make \
  libtool \
  curl

Fetching the sources

The host of Opkg, the Yocto Project, offer access to the source repository and archived tags.

Building

Opkg comes with a fancy pants autoconf script to tailor the configure file for us so before we do anything we must run:

noam@mandromeda:~/opkg-src$ autoconf 

After autconf successfully completes we can then carry on with the ol’ standard:

noam@mandromeda:~/opkg-src$ ./configure --with-static-libopkg --disable-shared \
  && make \
  && sudo make install 

And viola!

Advertisements

8 thoughts on “Installing Opkg on Ubuntu

  1. I followed your instruction but while executing the first step to download dependencies I got an error saying no package named libarchive13 found. I searched for the package too, using command apt-cache search libarchive13 . No result .
    What should I do now ?

  2. I followed your instruction but while executing the first step to download dependencies I got an error saying no package named libarchive13 found. I searched for the package too, using command apt-cache search libarchive13 . No result .
    What should I do now ?

      1. I did that too. I’m trying to install it on Debian image for Intel Galileo gen 2 boards.

        If it helps this was the output of command cat /etc/issue to determine OS.
        Debian GNU/Linux 7

  3. I did that too . I’m trying to install it on Debian image for Intel Galileo gen 2 boards. If it helps this is the detail related to my OS running on the board.

    PRETTY_NAME=”Debian GNU/Linux 7 (wheezy)”
    NAME=”Debian GNU/Linux”
    VERSION_ID=”7″
    VERSION=”7 (wheezy)”
    ID=debian
    ANSI_COLOR=”1;31″
    HOME_URL=”http://www.debian.org/”
    SUPPORT_URL=”http://www.debian.org/support/”
    BUG_REPORT_URL=”http://bugs.debian.org/”

  4. wouldn’t hurt to explain what –with-static-libopkg and –disable-shared \ do…

    also there are a lot more dependencies to install that you didn’t mention

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s