# FreeBSD binary packages



## TroN-0074 (Nov 11, 2013)

I found this announcement very useful about getting binary packages for FreeBSD: http://lists.freebsd.org/pipermail/freebsd-announce/2013-October/001510.html. However there is a part of the instructions that I can't figure out what file to edit to include the mirrors.



> Mirrors you may use instead of the global pkg.FreeBSD.org:
> 
> pkg.eu.FreeBSD.org
> pkg.us-east.FreeBSD.org
> pkg.us-west.FreeBSD.org



Can somebody please point out where this file resides so I can modify it to include the right mirror?

I was running FreeBSD 9.1, 32 bit. But I ran the command `# freebsd-update -r 9.2-RELEASE upgrade` and it looks like I now running FreeBSD 9.2, I would like to be able to install binary applications.

I will appreciate all advice, thank you.


----------



## fonz (Nov 11, 2013)

From the looks of it, it's /usr/local/etc/pkg/repos/FreeBSD.conf as created in step 4.


----------



## jrm@ (Nov 11, 2013)

pkg.freebsd.org is an SVR record that lists the mirrors, and pkg automatically picks the best one. There was a discussion about this on current@.


----------



## TroN-0074 (Nov 12, 2013)

I did all the steps suggested on that link and when I run `pkg`. I get
	
	



```
pkg: Invalid configuration format, ignoring the configuration file
```
Then it runs and identifies what packages need to be upgraded, but then it stops and says

```
pkg: [url]http://pkg.FreeBSD.org/freebsd:9:x86:32/latest/All/p5-Net-SSLeay-1.55.txz:[/url] No address record
```
What can I do? I will appreciate all advice*.*


----------



## Beastie (Nov 12, 2013)

Does your connection work for everything else? Perhaps there was a problem with the mirror it chose to use at that particular time. Have you tried it more than once?

Can you post your /usr/local/etc/pkg.conf file?


----------



## TroN-0074 (Nov 12, 2013)

Thank you.

Yes, the connection works for everything else if you see on my original post I am following the instructions posted on that link which states


> To use binary packages:
> 
> 1. Ensure your pkg(8) is up-to-date. 'pkg -v' should say at least
> 1.1.4_8. If it does not, first upgrade from ports.
> ...



Note step #2 suggesting to get rid of /usr/local/etc/pkg.conf

Thank you I appreciate all advice*.*


----------



## Beastie (Nov 12, 2013)

Yes, I already know about that mailing list message. But I already had a /usr/local/etc/pkg.conf file before reading it and never bothered removing it, especially that I _do_ need it since I use a non-default PKG_CACHEDIR.

I'd create one if I were you. Mine looks like this:

```
packagesite: http://pkg.freebsd.org/freebsd:9:x86:32/latest
PKG_CACHEDIR: /path/to/my/local/repository
```

Using _pkg.freebsd.org[/u] leaves the program with the freedom to choose between mirrors, so I don't see a problem here._


----------



## TroN-0074 (Nov 12, 2013)

Thank you @Beastie, and all*.*

After seeing the above post (post #7) I went and edited my /usr/local/etc/pkg.conf file to look like 


```
#packagesite: [url]http://pkgbeta.freebsd.org/freebsd-9-i386/latest[/url]

#packagesite: [url]http://ftp.pcbsd.org/pub/mirror/packages/9.1-RELEASE/i386/[/url]

packagesite: [url]http://pkg.freebsd.org/freebsd:9:86:32/latest[/url]

PUBKEY: /usr/local/etc/pkg-pubkey.cert

PKG_CACHEDIR: /usr/local/tmp
```

I ran `# pkg update` and this is the reply


```
# pkg update
Updating repository catalogue
pkg: [url]http://pkg.freebsd.org/freebsd:9:86:32/latest/digests.txz:[/url] No address record
```

Really I don*'*t know what is going on.

I will appreciate further advice. 

Thank you*.*


----------



## Beastie (Nov 13, 2013)

```
http://pkg.freebsd.org/freebsd:9:[highlight][u]x[/u][/highlight]86:32/latest
```
It's missing an "x".


----------



## kpa (Nov 13, 2013)

"No address record" probably means that the client can not find the necessary SRV DNS records for the address pkg.freebsd.org. Try putting a mirror directly in pkg.conf:


```
packagesite: http://pkg0.isc.freebsd.org/freebsd:9:x86:32/latest
```


----------



## TroN-0074 (Nov 14, 2013)

Big thank you for all the help. I finally got pkg to completed the downloads. Once it was done though it says checking integrity, then just gave me a lot of warnings and it didn't upgrade any of the packages. I looked for a way to solve the conflicts but could find anything*.*

I will appreciate further advice*.*


----------



## Beastie (Nov 14, 2013)

@TroN-0074, without knowing what the exact error message was word for word, we can only guess. Also what conflicts are you talking about?

Are you starting from scratch or do you already have packages installed?

If you have packages of the old type, did you convert them to the new type with `pkg2ng`?

Did you get a 
	
	



```
pkg: cached package xyz: checksum mismatch
```
 error or similar? Like it says, this means the packages are already installed but are different from the ones found on the server. You may want to force reinstall them (`# pkg install -f package-name`).

Have a tried a full upgrade of all your packages (`pkg upgrade -fy`)?

Finally note that every install/delete/upgrade command will ask for confirmation, unless you give it the -y option.


----------



## TroN-0074 (Nov 14, 2013)

*warnings*

I did converted all the package a while back and I did issue the upgrade command with the -fy argument.

I am using FreeBSD 9.2, 32 bit with GNOME2 and I have a few extra applications like Firefox, VLC, Thunderbird, I installed Flash player too for YouTube.

I appreciate all advice. Thank you*.*

Some messages look like this

```
Conflict found on path /usr/local/man/man1/perlcygwin.1.gz between perl5.14-5.14.4_2(lang/perl5.14) and perl5-5.16.3_2(lang/perl5.16)
```

Other looks like this


```
pkg: WARNING: locally installed folks-0.2.1_1 conflicts on /usr/local/share/vala/vapi/folks.vapi with:
	- folks04-0.4.3_1
```


----------



## Beastie (Nov 14, 2013)

I remember having that problem with Perl and I fixed it by simply force-deleting the package (`# pkg delete -f package-name`) then reinstalling it (`# pkg install package-name`).

Force-reinstalling it (`# pkg install -f package-name`) didn't work, IIRC.

I believe you could do the same with the second one too.


----------



## TroN-0074 (Nov 16, 2013)

Thank you, problem solved. I am now fully updated. Editing/usr/local/etc/pkg.config and /usr/local/etc/pkg/repos/FreeBSD.conf really helped.

Also I uninstalled the conflicting packages as suggested on post #14, except for lang/perl which I solved by issuing

```
# pkg set -o lang/perl5.14:lang/perl5.16
    # pkg install -Rf lang/perl5.16
```
As suggested by entry 20131023 on the `UPDATING` file.

Thank you for all the help, please mark the thread as solved.


----------

