https://mirror.leaseweb.com/pub/OpenBSD/6.1/packages/amd64/quirks-2.304.tgz” title=”quirks-2.304.tgz: ftp: Error retrieving file: 404 Not Found
signify: gzheader truncated
https://mirror.leaseweb.com/pub/OpenBSD/6.1/packages/amd64/nginx-1.10.2p2.tgz” title=”nginx-1.10.2p2.tgz: ftp: Error retrieving file: 404 Not Found
signify: gzheader truncated
How do I change or configure OpenBSD package install mirror for the pkg_add command?
To install or update software packages you need to use the pkg_add command on OpenBSD Unix system. You can PKG_PATH variable pointing to the OpenBSD mirror or edit the file named installurl.
Method 1: Edit /etc/installurl
This file contains a single line specifying an OpenBSD mirror. This file is created by the installer script during installation or upgrade. To edit,
$ doas vi /etc/installurl
Delete or comment out (add # at the beginning of old mirror) existing line. Next add/append a new mirror name
#https://mirror.leaseweb.com/pub/OpenBSD
https://ftp.openbsd.org/pub/OpenBSD
Save and close the file. You can now use the pkg_add command:
$ doas pkg_add -v nginx
To update all installed packages from new mirror run:
$ doas pkg_add -u -v
Sample outputs:
Update candidates: quirks-2.304 -> quirks-2.304 quirks-2.304 signed on 2017-04-02T15:01:33Z Update candidates: bash-4.4.12 -> bash-4.4.12 Update candidates: gettext-0.19.8.1 -> gettext-0.19.8.1 Update candidates: libiconv-1.14p3 -> libiconv-1.14p3 Update candidates: pcre-8.38p0 -> pcre-8.38p0 Update candidates: pftop-0.7p15 -> pftop-0.7p15
Method 2: Set PKG_PATH shell variable
If a given package name cannot be found, the directories named by PKG_PATH are searched. One can set it as follows for bash/sh/ksh:
# export PKG_PATH=http://ftp.eu.openbsd.org/pub/OpenBSD/`uname -r`/packages/`uname -m`/
OR
# export PKG_PATH=https://ftp4.usa.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(uname -m)/
Run the command:
# pkg_add -v packagename
# pkg_add -v nginx
Sample outputs:
Update candidates: quirks-2.304 -> quirks-2.304 quirks-2.304 signed on 2017-04-02T15:01:33Z nginx-1.10.2p2:pcre-8.38p0: ok nginx-1.10.2p2: ok The following new rcscripts were installed: /etc/rc.d/nginx See rcctl(8) for details. Look in /usr/local/share/doc/pkg-readmes for extra documentation. Extracted 4819702 from 4820755
For more info see the pkg_add man page:
$ man pkg_add
$ man 5 installurl
🐧 0 comments... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |