7

I'm trying to install a package to my OpenWrt SDK. To do that you have to use OPKG package manager by typing:

opkg update
opkg install <package>

However, in my case, OPKG is not installed and as a result I can't proceed.

Could anybody tell me how can I install it? Thank you.

I'm using Kubuntu btw:

Linux ghanem-VGN-BZ31XT 3.16.0-34-generic #47-Ubuntu SMP Fri Apr 10 18:02:58 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Jesse James
  • 1,203
  • 5
  • 22
  • 39

1 Answers1

8

Opkg doesn't really have a 'release' you can just install - that is because it needs native libraries of your OS and it can be used in a very wide array of OSs.

Whenever I have to play with it on Ubuntu I have these 3 'one-liners' to install it, if you try and modify it to match your OS I'm sure it'll work for you:

  • Download opkg release (latest when this was written was 0.3.1):
    wget http://downloads.yoctoproject.org/releases/opkg/opkg-0.3.1.tar.gz
  • tar -zxvf opkg-0.3.1.tar.gz
  • install compilation dependencies: apt-get update && apt-get install -y gcc libtool autoconf pkg-config libarchive13 libarchive-dev libcurl3 libcurl4-gnutls-dev libssl-dev libgpgme11-dev libtool-bin
  • compile(compile with gpg support for signature verification, and curl to support basic auth - leave the enable-curl flag out to use it with the default wget): * (pre-compilation) if there's no configure script (a file called configure) you need to call ./autogen.sh first * ./configure --with-static-libopkg --disable-shared --enable-gpg --enable-curl --prefix=/usr && make && sudo make install

After make install is done you will have opkg installed - remember to add opkg.conf (example here) under /etc/opkg

danf
  • 2,629
  • 21
  • 28
  • I'm trying to install OPKG package manager on Debian which I'm using with Intel galileo gen 2 board . When I tried to install the dependencies libarchive13 and libtool-bin were reported as "no package named libarchive13/libtool-bin found". And sir since I'm quite new to Linux environment I wasn't able to understand the part where you said " After make install is done you will have opkg installed - remember to add opkg.conf (example here) under /etc/opkg " . can you please explain what we have to do as the link attached by you didn't made much sense to me. Thank you . – Rishi Shukla May 01 '16 at 17:17
  • `opkg.conf` is the config file for opkg - the link I posted is an example of one. In order to compile opkg(assuming you have all dependencies correctly installed ) you should use `make`, to have it also install (meaning just putting the binary under `/usr/lib` or wherever) use `make install`. As for your dependency issue - I don't know the solution - you need these libs compiled for your specific board, how to get them is up to you (either get a compiled version or compile the sources yourself with a suitable compiler) – danf May 01 '16 at 18:02
  • Note these instructions did not work for me on Linux Mint 18.2 with opkg-0.3.5. The `autogen.sh` was not there and it appears there was a file missing: `/bin/bash: ../conf/depcomp: No such file or directory`. When I tried 0.3.1, it only worked after I installed `automake` via `sudo apt install automake` – kmort Oct 09 '17 at 22:54