pkg_add not working propely on OpenBSD

0

Would like to have emacs installed on my server running OpenBSD instead of just vi, reason because I am used to emacs.

I am compleatly new to OpenBSD so I started reading the documentation, after tried pkg_add emacs, this is the result

https://cdn.openbsd.org/pub/OpenBSD/6.4/packages-stable/amd64/: ftp: cdn.openbsd.org: no address associated with name
https://cdn.openbsd.org/pub/OpenBSD/6.4/packages/amd64/: ftp: cdn.openbsd.org: no address associated with name
https://cdn.openbsd.org/pub/OpenBSD/6.4/packages/amd64/: empty
Can't find emacs

So I go back to documentation, I read that

There is also an ambiguity related to ports with multiple branches.  
For instance `pkg_add python' is ambiguous, as there are several versions of
python in the ports tree.  So is `pkg_add postfix'.  The special form
`pkgname%branch' can be used to restrict matches to a branch matching the
pkgpath(7).

The above ambiguities can be resolved using `pkg_add postfix%stable' and
`pkg_add python%3.4', respectively.

So I try installing python3.4 using (as the documentation) pkg_add python%3.4, but get the same error as before when trying with emacs.

Now I am certain that there is something wrong in the config of pkg_add, but what? I have tried running pkg_check, but it just say everything is ok.

Salviati

Posted 2018-11-25T13:27:11.187

Reputation: 101

Answers

1

Is your network properly configured? pkg_add can't seem to resolve cdn.openbsd.org (hence no address associated with name), which likely means you either have no DNS server configured (it should be in /etc/resolv.conf, which usually is written by dhclient if you use DHCP to configure a network interface) or you have it configured but can't reach it because your network connection is down. Check if your network is up and properly configured and check if you have a nameserver in /etc/resolv.conf.

Zé Loff

Posted 2018-11-25T13:27:11.187

Reputation: 111