Solved Newer packages not able to be installed

Hello all,

Just looking through and trying to install a newer package I saw in the ports section of the site and I noticed this:

Capture.PNG


What it appears to be is after doing this:
Bash:
pkg clean -a
pkg update -f

I cannot seem to install the newest version of elasticsearch and it does not want to update the database to get this version.

How can I install it?

Thank you all
 
Chances are you are running on the quarterly version of the package repository and not the latest version. Which means unless the port has a security issue it is unlikely to be updated until the next quarter. If you want the latest version then create a file called /usr/local/etc/pkg/repos/FreeBSD.conf and put this in it:

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

If you have security/ca_root_nss installed then you can change that URL to say https rather than http if you like.
 
Thank you so much! One of the reasons I love this community! :D

Last question, if I do this configuration will that affect all packages if I do a pkg update here after? Or is there a way I can localize it to the elk stack and dependencies?

Thanks again!
 
Last question, if I do this configuration will that affect all packages if I do a pkg update here after?
Yes, you're basically telling your system to grab the software from another repository which means that you'll probably encounter many updated versions for whatever you got installed (note: assumption on my part because I obviously don't know what software you have installed ;) ).
 
I see, so, if I cheated the system a little, let's say I updated the /etc/pkg/FreeBSD.conf (which is the one I'm assuming xtaz meant since I don't see the one he listed in the /usr/local side).

Would I then be able to change it back to quarterly after I install everything I need?
 
Would I then be able to change it back to quarterly after I install everything I need?
That could potentially corrupt your entire system.

The problem is that binary packages have specific dependencies and you cannot change those yourself (unless you build the package yourself using the ports collection). Therefor all packages in the repository are carefully checked so that they share the same dependencies. Think about libraries and such.

So if this package uses specific libraries and you already have those installed on your system then you can safely assume that those libraries (and every other package which depends on them) will be upgraded.

If you'd then switch back to quarterly you'd face 2 problems: you wouldn't get any more (security) updates because you already have a much newer version of the provided software. And worse: the moment you install something new which depends on a certain library then that library would get downgraded again, resulting in the removal of every package that depended on the newer version.

So I really wouldn't do this.

There is a change that this can work, but it heavily depends on the package you're trying to install and its dependencies. You could check FreshPorts for info on that.

(edit)

My Jail also uses the quarterly binary repository and I think you overlooked something:

Code:
root@psi:/ # pkg search elasticsearch | head -4
elasticsearch-plugin-head-2015.12.16 ElasticSearch Head Plugin
elasticsearch5-5.6.8_5         Full-text search engine for Java
elasticsearch5-search-guard-5.6.8 Elasticsearch Search Guard plugin
elasticsearch6-6.3.2           Full-text search engine for Java
root@psi:/ # grep url /etc/pkg/FreeBSD.conf 
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
root@psi:/ # file /usr/local/etc/pkg/
/usr/local/etc/pkg/: cannot open `/usr/local/etc/pkg/' (No such file or directory)
Notice elasticsearch5 & elasticsearch6?
 
Sweet, I'll call this resolved, since I'll probably just stick with 6.3.2, even though it's not the new hotness.
I can wait though.
 
let's say I updated the /etc/pkg/FreeBSD.conf (which is the one I'm assuming xtaz meant since I don't see the one he listed in the /usr/local side).
Never edit /etc/pkg/FreeBSD.conf, create the file as indicated by xtaz
 
Yeah. The reason I said that is because the settings in the file you create take priority over the settings from the other file. If you just edit the original file then it can get overwritten during a system upgrade, or it's an extra hassle if there are changes and it asks you to merge them.
 
Back
Top