6

The ports repository (svnweb.freebsd.org/ports/head/) shows haproxy is version 1.7.10 but pkg search haproxy gives me

haproxy-1.7.9 Reliable, high performance TCP/HTTP load balancer

It suggests that pkg search uses other source instead of FreeBSD ports. Is that true?

How can I install the latest version of haproxy-1.7.10 in FreeBSD (preferably using a binary package)?

migrated from serverfault.com Mar 27 '18 at 15:45

This question came from our site for system and network administrators.

  • Install from the ports collection. – Richard Smith Mar 26 '18 at 7:56
  • 2
    @RichardSmith This is a bad advice. OP clearly have been using packages and mixing packages and ports is a bad idea, generally. – arrowd Mar 26 '18 at 8:41
11

I guess that you're installing packages from the quarterly branch.

The quarterly branch does not always have the latest software, which is why it is regarded more stable than the latest branch. The newest one is 2018Q1 currently and as you can see here the newest haproxy is not there yet.

You may switch to the latest branch as described in the "PKG Repository Changed to Quarterly in 10.2?" thread on FreeBSD Forums.

Put the following code into /usr/local/etc/pkg/repos/FreeBSD.conf:

FreeBSD: {
    url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
}

It is generally recommended to store your installed software configuration files under /usr/local. This way it is easier to separate those settings from the configuration files of software shipped with FreeBSD. pkg(8) is somewhat special. Although being an essential utility it is not installed by default (it has to be bootstraped using pkg(7)). This is why its configuration files fit both /etc and /usr/local/etc.


See also:

  • The logic regarding /etc vs /usr/local/etc is more about what is related to base system (FreeBSD without any port/packages) and what is port/packages stuff. – Ouki Apr 15 '18 at 11:41
  • 1
    @Ouki Is it better now? – Mateusz Piotrowski Apr 15 '18 at 13:16
3

Check what package repository are you using:

cat /etc/pkg/FreeBSD.conf

Make sure you have url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest" in there, not quarterly.

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.