# Cannot search pkg repos



## na5m (Oct 18, 2013)

Doing a `pkg search` yields nothing, even for well known packages.


```
# pkg search bash
#
```
The only pkg command that seems to work is `pkg info`

```
# pkg info
pkg-1.1.4_7                      New generation package manager
#
```

[SIZE="4"]Any help at all would  be a god-send [/SIZE] 

I'm currently running FreeBSD 10.0-BETA1 #0 r256420


----------



## SirDice (Oct 18, 2013)

There are no official pkgng repositories yet.


----------



## na5m (Oct 18, 2013)

SirDice said:
			
		

> There are no official pkgng repositories yet.



Bummer. Now I have no way to install anything.

```
# pkg_add
pkg_add: Command not found.
#
```


----------



## fonz (Oct 18, 2013)

Various people have reported success using the PC-BSD repositories. A quick search on this forum should get you started. There are also people here who have their own repositories.


----------



## SirDice (Oct 18, 2013)

na5m said:
			
		

> Now I have no way to install anything.


Sure you have. Ports still work


----------



## lib13 (Oct 18, 2013)

na5m said:
			
		

> Doing a `pkg search` yields nothing, even for well known packages.
> 
> 
> ```
> ...



I was having the same problem in 9.2-RELEASE. I got rid of the installed ports so that I could install binaries with pkg instead of compiling them on my slow Atom.



			
				SirDice said:
			
		

> There are no official pkgng repositories yet.


This is almost funny.  pkg is heavily advertised but there are no repositories...  A house that starts to be built from the roof? How can this happen?


----------



## kpa (Oct 18, 2013)

lib13 said:
			
		

> This is almost funny.  pkg is heavily advertised but there are no repositories...  A house that starts to be built from the roof? How can this happen?



All the resources, machines and other infrastructure, for package building that could be used for building PKGNG packages are still dedicated to building the old style packages because FreeBSD 8 and 9 are still using the old format packages by default. They have to be supported until they are officially changed to default to the new PKGNG format packages or they are EoL'ed.

PKGNG is still BETA and it's not yet meant for end users who just want to install binary packages without much thought how the packages were built. At the moment it is for those who want to build their own packages and want to move away from the old style packages that have numerous problems that are impossible to solve without a new package format.

A question, where is the "advertisement" that says that PKGNG is ready to use for everyone? I'd like to see that because the official documentation does not really say anything like that.


----------



## jb_fvwm2 (Oct 19, 2013)

One would be advised to re-read all of /usr/ports/UPDATING while updating ports if one uses packages at all, and/or has installed the  /pkg/  port and uses `portmaster; portupgrade` to update ports.  Even more so if upgrading between major versions.  And maybe subscribe to the freebsd-ports mailing list, issues and methodologies may be promulgated there more so than in /usr/ports/UPDATING.  (A few threads in this forum also discuss it at length.) One of those topics for which I sometimes wish there were a comprehensive flowchart covering all aspects, that would put it way ahead in usability/reliability than other package systems AFAIK, notwithstanding the revisions, updates, etc that may be necessary.

As an aside, I almost forgot to mention the FreeBSD wiki about it, browsing that periodically, it has an 'info' link at the top where one can see the most recent changes, and sometimes it is quicker to read the comments in the changelog than re-read the entire wiki.  And of course the Release Notes for each major/minor version bump.

Now that I've posted my advice, I can write it down so as to have it available all in one place. So it has that going for it.


----------



## beatgammit (Oct 19, 2013)

As mentioned previously, you can use PC-BSD's repository. For the lazy, here are the instructions:

Put this in /usr/local/etc/pkg.conf:


```
packagesite: http://pkg.cdn.pcbsd.org/9.2-RELEASE/amd64

PUBKEY: /usr/local/etc/pkg-pubkey.cert
PKG_CACHEDIR: /usr/local/tmp
```

Next, download the repository's public key cert file, and copy it to /usr/local/etc/pkg-pubkey.cert.

Update your package database: `pkg upgrade -fy`

I switched over to it on 9.2-RELEASE and I've had no problems with installing packages.


----------



## na5m (Oct 19, 2013)

SirDice said:
			
		

> Sure you have. Ports still work



The ports collection doesn't seem to have pkg_add. I found pkg_add_it and built it, but when I go to use it, I get an error message:
	
	



```
fetch: ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-10-stable/INDEX: File unavailable
```


----------



## fonz (Oct 19, 2013)

na5m said:
			
		

> The ports collection doesn't seem to have pkg_add.


Correct. For FreeBSD versions up to 9 pkg_add is in the base system (i.e. it comes with the OS). And in FreeBSD 10 it will be obsolete. In both cases, it obviously makes no sense to have it in the ports collection.



			
				na5m said:
			
		

> I found pkg_add_it


That is a third-party application. In other words: it's something somebody made, not the base system tool you were looking for.



			
				na5m said:
			
		

> ```
> fetch: ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-10-stable/INDEX: File unavailable
> ```



Obligatory disclaimer: Topics about unsupported FreeBSD versions
As said above, there are no official packages for FreeBSD 10 yet, that includes 10-STABLE.
As said above, FreeBSD 10 will use a different package format. There will no longer be an INDEX file (not in the package repository, anyway).


----------



## lib13 (Oct 19, 2013)

beatgammit said:
			
		

> As mentioned previously, you can use PC-BSD's repository. For the lazy, here are the instructions:
> 
> Put this in /usr/local/etc/pkg.conf:
> 
> ...



It's not for the lazy, it's for the ones that have x86_64 systems.  As far as I know, it's not available for x86 systems.


----------



## lib13 (Oct 19, 2013)

kpa said:
			
		

> A question, where is the "advertisement" that says that PKGNG is ready to use for everyone? I'd like to see that because the official documentation does not really say anything like that.



English is not my mother language, but when I read the Handbook (http://www.freebsd.org/doc/handbook/packages-using.html), there's this sentence (my emphasis):


> This section describes the traditional method for managing binary packages and only applies to those users who have not yet migrated to the pkgng format.



Then at http://www.freebsd.org/doc/handbook/pkgng-intro.html there are the instructions to use pkgng

So, I'm able to conclude from this that either the Handbook is not meant for the present RELEASE(S) but for the next 10 version (and thus it should say so) or the web page about PKGNG should not exist yet or, at least, it should mention that there are no repositories yet and it is only meant to be used in version 10.

One more thing, and this is something that I came across before.  The Handbook is always evolving and doesn't separate instructions for the various major releases which causes several problems (like this one).  There should be a Handbook for each major release to be maintained with all the stuff that is meant for that release only, so that users are not misguided.

Regarding the 'advertisement' it's all over the web. My search in Google (_freebsd pkgng_) resulted in circa 85000 results.


----------



## beatgammit (Oct 19, 2013)

lib13 said:
			
		

> It's not for the lazy, it's for the ones that have x86_64 systems.  As far as I know, it's not available for x86 systems.



I meant I was copying the instructions from the link for those too lazy to go to the link. But you're right, they don't build 32-bit packages (AFAICT), so for pkgng, if you don't create your own repository and you're on 32-bit, you can't use binary packages. I should have mentioned that.

I guess it depends on whether your Atom is 64-bit or 32-bit.



			
				lib13 said:
			
		

> English is not my mother language, but when I read the Handbook (http://www.freebsd.org/doc/handbook/packages-using.html), there's this sentence (my emphasis)



I got that too, and I was really confused when the only package I could update was pkg. They say that by the time 10 is released, the repositories will be ready, so there's that.


----------



## na5m (Oct 20, 2013)

*Avant-garde*

Thank you all for the solid replies! At this moment in time, I think that FreeBSD 10 is a bit too avant-garde for me. So I re-installed 9.2 :e


----------



## na5m (Oct 20, 2013)

PS- Can someone mark this thread "SOLVED" for me? I tried to do it, but the "Posting Rules" say "You *may not* edit your own posts" 

Thanks!


----------

