1

I installed OpenBSD and then proceeded to download firefox using the PKG_PATH environment. It worked and seemed to run reasonably well but then, wanting to try another browser, I deleted firefox using pkg_delete (which of course wasn't necessary).

I now find myself unable to download any browser as for some reason the system now doesn't recognize any ftp server I try to connect to. Every time I try to using 'export PKG_PATH', I get the message 'no such directory'.

Any hints at what happened and what I might do ?

1

Don't use the environment variable PKG_PATH, you don't need it. If you installed the system using a mirror, the package tools are smart enough to use the same mirror to download the packages.

Otherwise, run this command as root:

echo 'https://cdn.openbsd.org/pub/OpenBSD' > /etc/installurl

If you're using -stable, pkg_add will download the packages from there.

If you're running -current and pkg_add can't find the packages, use pkg_add -Dsnap instead. For example: pkg_add -Dsnap -Vi chromium firefox.

  • Thanks for your suggestion. However, when running the command as root and then using pkg_add to download the packages, I get the following message: ftp: SSL write error: ocsp verify failed: ocsp response not current. I am not sure what this means, is there another solution I might try ? – antiochus Apr 25 at 9:35
  • Try these commands as root: rcctl set ntpd flags -s, rcctl start ntpd and rcctl enable ntpd. Wait a few seconds and then run the pkg_add command. – Rufo El Magufo Apr 26 at 13:18
0

You bumped into something that happens before every OpenBSD release. OpenBSD is developed on a "single track": the source tree is tagged as 6.4, a release is made, developments continue for about 6 months and are made available as snapshots, until the devs find that things have changed and are stable enough to warrant a new release, at which point the tree is tagged as 6.5 and so on.

This means that for a short period of time (i.e. some days before a new release) the kernel is marked as "6.5" instead of "snapshot". When you use pkg_add, so it'll look for packages for the kernel you are running, it'll look for "6.5" packages, which will only be available later hence the no such directory. As answered by Rufo, adding -D snap to pkg_add will solve the (temporary) problem, by telling pkg_add to look for "snapshot" packages, even with a "release" kernel. From man pkg_add:

snap
  Force ‘%c’ and ‘%m’ to expand to ‘snapshots’, even on a release kernel

This is obviously not ideal, but it has been time-tested and is what works better for the OpenBSD devs (see the presentation linked above to know more about OpenBSD's release engineering). Adding -D snap for a few days before releases once every two months is a small price to pay for using snapshots.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.