opkg package - negan07/ancistrus GitHub Wiki
opkg update && opkg install opkg
Binaries included: opkg
Config files: /usr/etc/opkg.conf
GUI section: Package Manager
Usage: opkg help
Nvram variables: none
The opkg package utility is a lightweight package manager used to download and install the packages from one or more package repository, local or remote.
It also includes openssl and curl (router builtin) support to work also with encrypted https repositories.
With opkg people have the opportunity to choose the packages needed for their purposes only.
Some opkg Docs:
https://code.google.com/archive/p/opkg/
https://openwrt.org/docs/guide-user/additional-software/opkg
The opkg binary contains statically inside the archive lib, needed to treat the compressed archives inside .ipk packages.
Some libarchive Docs
This shared lib is needed to work with .gz compression format.
Some Zlib Docs
Install a package.
GUI: here's the list of the available packages with related description and byte size. Select the package to install and click Apply
. Then, press: Refresh GUI
to refresh the GUI with the updated menu list.
Console: to install a package type:
opkg update
opkg install <packagename>
Install a new package or reinstall if already present: used to refresh a package in case of troubles or broken installations.
GUI: here's the list of all the available packages with related description and byte size. Select the package to force-reinstall and click Apply
. Then, press: Refresh GUI
to refresh the GUI with the updated menu list.
Console: to force-reinstall a package type:
opkg update
opkg install --force-reinstall <packagename>
Remove an installed package. Note that some packages like openssl
curl
and zlib
are essential for the router and can't be removed.
GUI: here's the list of the installed packages. Select the package to remove and click Apply
. Then, press: Refresh GUI
to refresh the GUI with the updated menu list.
Console: to remove a package type:
opkg update
opkg remove <packagename>
Show the list of the upgradable packages.
GUI: here's the list of the upgradable packages. Select the package to upgrade and click Apply
. Then, press: Refresh GUI
to refresh the GUI with the updated menu list.
Console: to upgrade a package type:
opkg update
opkg install <packagename>
Upgrade all the packages at once.
GUI: press: Refresh GUI
to refresh the GUI with the updated menu list.
Console: to upgrade the packages type:
opkg update
opkg upgrade
Edit the opkg configuration file (for example to change or add a repository url, activate overlap paths, ...).
GUI: edit the file content then press save
to save the edited config file.
Console: type:
vi /usr/etc/opkg.conf
press: i
than make your own modifications then press <ESC>
then :wq
to save ( :q!
to abort without saving ).
Cleanup tmp opkg dirs & cache infos.
Console: to cleanup opkg cache type:
opkg clean
rm -rf /tmp/opkg*
This action can be done in case of troubleshooting package installations/upgrades/removals.
It will erase all packages related files present in the partition mounted in /usr/lib/opkg
containing all packages status, files lists, control scripts: no physical installed files will be removed.
After this action no packages will result installed even if their files still remain on flash.
GUI: press Erase Package Informations
to erase /usr/lib/opkg/*
info/status dir & files.
Console: to erase package informations type:
opkg clean
rm -rf /usr/lib/opkg/* /tmp/opkg*
GUI: browse and select a valid .ipk
package then press: Install
.
Console: to install a package manually upload a valid .ipk
package into /tmp
dir with one method like:
curl, wget or through scp (openssh) locally or remote.
Curl: cd /tmp && curl -k -O http://<URL>/<PACKAGENAME.ipk>
Wget: cd /tmp && wget -O <PACKAGENAME.ipk> http://<URL>/<PACKAGENAME.ipk>
Scp from host: scp <PACKAGENAME.ipk> root@D7000:/tmp/
Scp from router: cd /tmp && scp <HOSTNAME>:/${HOME}/<PACKAGENAME.ipk> .
Then install package typing:
opkg install /tmp/<PACKAGENAME.ipk>