# Open Package Management

## Open Package Management

> Opkg (Open PacKaGe Management) is a lightweight package management system based upon ipkg. It is written in C and resembles APT/dpkg in operation. It is intended for use on embedded Linux devices and is used in this capacity in the OpenEmbedded and OpenWrt projects. Wikipedia

* [Open Package Management Wikipedia](https://en.wikipedia.org/wiki/Opkg)
* [AlexT's Galileo & Edison pages](http://alextgalileo.altervista.org/package-repo-configuration-instructions.html)
* [How to enable the Yocto-provided package management capability](https://communities.intel.com/thread/48408)

## Package Installation via Remote Repositories

Update Opkg Repositories

```bash
root@edison:~# opkg update
Downloading http://iotdk.intel.com/repos/1.5/intelgalactic/Packages.
Updated list of available packages in /var/lib/opkg/iotkit.
root@edison:~#
```

Enable a Opkg feed and update package list, we will not upgrade to avoid consuming disk space

```bash
root@edison:~# vi /etc/opkg/base-feeds.conf # Add the below lines to the opened file
```

```bash
src/gz all http://repo.opkg.net/edison/repo/all
src/gz edison http://repo.opkg.net/edison/repo/edison
src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32
```

```bash
root@edison:~# opkg update
Downloading http://repo.opkg.net/edison/repo/all/Packages.gz.
Inflating http://repo.opkg.net/edison/repo/all/Packages.gz.
Updated list of available packages in /var/lib/opkg/all.
Downloading http://repo.opkg.net/edison/repo/edison/Packages.gz.
Inflating http://repo.opkg.net/edison/repo/edison/Packages.gz.
Updated list of available packages in /var/lib/opkg/edison.
Downloading http://repo.opkg.net/edison/repo/core2-32/Packages.gz.
Inflating http://repo.opkg.net/edison/repo/core2-32/Packages.gz.
Updated list of available packages in /var/lib/opkg/core2-32.
Downloading http://iotdk.intel.com/repos/1.5/intelgalactic/Packages.
Updated list of available packages in /var/lib/opkg/iotkit.
root@edison:~#
```

Install Git, Version Control System

```bash
root@edison:~# opkg install git
```

Check if RMAA and UPM Libraries are installed

```bash
root@edison:~# opkg list-installed | grep mraa
root@edison:~# opkg list-installed | grep upm
```

Install and configure extra packages required

```bash
root@edison:~# opkg install nano git python-pip
root@edison:~# git config --global user.name "Name LastName"
root@edison:~# git config --global user.email email@adress.com
```

## Package Installation via Local Files

```bash
root@edison:~# wget http://repo.opkg.net/edison/repo/core2-32/less_458-r0_core2-32.ipk
root@edison:~# opkg install less_458-r0_core2-32.ipk
```

## Package Installation via Url Files

```bash
root@edison:~# opkg install http://repo.opkg.net/edison/repo/core2-32/less_458-r0_core2-32.ipk
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://theiotlearninginitiative.gitbook.io/embedded-linux/user-space/package-management-systems/open-package-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
