# FreeBSD 10-CURRENT and pkg_add?



## prp-e (Aug 28, 2013)

I've installed 10-CURRENT on VirtualBox and I can't find pkg_add on this release. How can I install packages using pkg_add? Should I use pkg?!
Regards.


----------



## SirDice (Aug 28, 2013)

There are no packages for 10-CURRENT. Not with the old pkg_* tools, nor with the new PKGNG.

[thread=40469]Topics about unsupported FreeBSD versions[/thread]


----------



## prp-e (Aug 28, 2013)

Thanks @SirDice. Problem was solved.


----------



## quakerdoomer (Oct 25, 2013)

*How?*

So how did you solve it? As common courtesy could you please disclose the solution to save people from starting a new thread for asking the same question? I am sure there are many who are facing this issue.


----------



## quakerdoomer (Oct 25, 2013)

I used fetch(1) to download libpcre, openssl, lighttpd (tbz files from /pub/FreeBSD/ports/amd64/packages-10-current/All/) and have been manually b-un-zipping them and have been moving the files into appropriate directories. It was a pain but I finally managed to get lighttpd running on 2013-10-14 FreeBSD 10.0-BETA1.

Next is for php5. Or maybe I'll just pull down pkg_add binaries and libraries from an 9.1 amd64 install.

SOLVED!


----------



## Beastie (Oct 25, 2013)

@quakerdoomer, why are you doing this? Why not just use PKGNG? Even if the pkg_* tools are not removed altogether in FreeBSD 10 (I have no idea), they have been deprecated and will definitely be removed in the near future.

There's a test PKGNG repository available at http://pkg1.nyi.freebsd.org/

http://www.mail-archive.com/freebsd-questions@freebsd.org/msg269628.html


----------



## SirDice (Oct 25, 2013)

quakerdoomer said:
			
		

> Or maybe I'll just pull down pkg_add binaries and libraries from an 9.1 amd64 install.


Don't. They're not going to work. Not unless you install misc/compat9x and I really don't recommend it.


----------



## quakerdoomer (Oct 27, 2013)

*Pkgng ??*

I keep reading this about using PKGNG but there is no such command pre-installed!
And if it is really a command, then since when did we start naming commands fully in upper-case?


----------



## wblock@ (Oct 27, 2013)

The command is `pkg`, the system is called "PKGNG".  It must be installed from ports before it can be used.


----------



## quakerdoomer (Oct 28, 2013)

I remember trying pkg. It asked my permission to add itself to the system.
Can anyone of you give me the syntax to add.. let's say Xorg to it using pkg (PKGNG)


----------



## wblock@ (Oct 28, 2013)

See Using pkgng for Binary Package Management.


----------



## Beastie (Oct 28, 2013)

quakerdoomer said:
			
		

> It asked my permission to add itself to the system.
> Can anyone of you give me the syntax to add.. let's say Xorg to it using pkg (PKGNG)


Remove the existing packages (I prefer to start from scratch):
`# rm -R /usr/local`
`# rm -R /var/db/pkg`

Install PKGNG: `# pkg`

Set packagesite in /usr/local/etc/pkg.conf to some usable repository, e.g.:

```
packagesite: http://pkg1.nyi.freebsd.org/freebsd:9:x86:64/latest/
```

Install some application: `# pkg install xorg-minimal`

The first time you use it, it will download an index of the repository. Then it will show you the application and its dependencies, as well as the download size and required disk space. When you confirm with a *y*, it will download and install all the files.


----------



## Aceso (Nov 11, 2013)

Beastie said:
			
		

> Remove the existing packages (I prefer to start from scratch):
> `# rm -R /usr/local`
> `# rm -R /var/db/pkg`
> 
> Install PKGNG: `# pkg`



Mad thanks @Beastie, I was dealing with some broken ports that I did not really need to build from source and could not get pkg(ng) to respond beyond "Updating repository catalogue" I overlooked `rm` the directory.


----------

