# Diablo and packages



## mosquetero (Aug 25, 2009)

Hi everyone!

I am trying to install Diablo-jdk-freebsd7.i386.1.6.0.07.02.tbz using the pkg_add command. After executing it, it says taht pkg_add could not find three packages: xtrans-1.0.4, xproto-7.0.10_1 and xextproto-7.0.2. I have already downloaded them but I don't know where to place them so that the system finds them. I read the manual for pkg_add and it says that the default location of the PKG_PATH is /var/db/pkg, but if I put the packages there, it doesn't work either.

Can you help me please??

Thank you in advance


----------



## graudeejs (Aug 25, 2009)

you need to place packages to */usr/ports/distfiles* (by default)

another way is to

```
pkg_add -r xtrans
pkg_add -r xproto
pkg_add -r xextproto
```
this will install these packages and dependencies (if necessary)


----------



## mosquetero (Aug 25, 2009)

I tried to do that but I don't know why /usr/ports does not exist!! I used to have freeBSD in other computer and in that one the folder existed... Do you know why?? Probably this is the source of my problems

Anyway, I created /usr/ports/disfiles and placed the bz2 packages over there but it doesn't work.

Can I use pkg_add if the files are .tar.bz2??


----------



## mosquetero (Aug 25, 2009)

I used sysinstall to install the ports collection that I didn't install when I first got FreeBSD. Now I have /usr/ports/distfiles. The three packages are there but it doesn't work. They are tar.bz2, should I unzip them and


```
Make install
```
??

If so, where?

Thanks


----------



## SirDice (Aug 25, 2009)

Just put all the files in the same directory and run pkg_add from there.

NB /usr/ports/distfiles is for source files needed by ports.


----------



## graudeejs (Aug 25, 2009)

well, you can cd to /usr/ports/distfiles (or dir, wher you have packages) and simply *pkg_add package.tbz*

No, tar.bz2 .tar.gz2 etc are not packages, they are source for ports..

packages end with *.tbz*

IN case you want to use ports you can

```
# rm -R /usr/ports/*
# portsnap fetch extract
```
make sure internet connection is up and running

next time use

```
# portsnap fetch update
```
to update ports tree


----------



## graudeejs (Aug 25, 2009)

SirDice said:
			
		

> Just put all the files in the same directory and run pkg_add from there.
> 
> NB /usr/ports/distfiles is for source files needed by ports.



weren't packages also downloaded there?
I don't remember, I don't use packages


----------



## SirDice (Aug 25, 2009)

killasmurf86 said:
			
		

> weren't packages also downloaded there?


Not sure where they end up if you use pkg_add -r. I've only created packages, never downloaded them


----------



## mosquetero (Aug 25, 2009)

Ok, sorry, they are not packages, they are sources. I am going to write everything in detail, which will probably help you. When I type:


```
pkg_add diablo-jdk-freebsd7.i386.1.6.0.07.02.tbz
```

And then I got:


```
pkg_add: could not find package xtrans-1.0.4 !
pkg_add: could not find package xproto-7.0.10_1 !
pkg_add: could not find package xextproto-7.0.2 !
```

I searched for them on the internet and I found and downloaded xextproto-7.0.2.tar.bz2, xproto-7.0.10.tar.bz2 and xtrans-1.0.4.tar.bz2.

Either placing these 3 files in /usr/ports/distfiles or in the same folder with diablo-jdk-freebsd... I still get the same answer.

Should I "unbzip" and "untar" them and then install or what?? One thing, I don't have connection to the internet in the FreeBSD computer but I still keep the installation CD.

Thanks KillasMurf86 and SirDice and everyone that can help me.


----------



## graudeejs (Aug 25, 2009)

No, you don't extract packages, that is done automatically by pkg_add

you downloaded sources, that's why it says, that you don't have xtrans.. etc packages.


----------



## graudeejs (Aug 25, 2009)

packages are here
ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-current/All

replace i386 with and64 depending on architecture (if you installed freebsd i386, use i386, if you installed freebsd amd64 use amd64)

replace packages-8-current with packages-7.2 (depending on your FreeBSD version)


----------



## graudeejs (Aug 25, 2009)

also if you go 1 dir back, you will see packages grouped in folders
directory, that I mentioned above, is vary HUGE for firefox... (ff will open it very slowly)
elinks works much better there


----------



## SirDice (Aug 25, 2009)

Even simpler solution:


```
# setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-current/Latest/
# pkg_add -r diablo-jdk16
```


----------



## graudeejs (Aug 25, 2009)

SirDice said:
			
		

> Even simpler solution:
> 
> 
> ```
> ...



he doesn't have Internet on FreeBSD box


----------



## mosquetero (Aug 25, 2009)

Thank you very much!! That ftp page is what I needed . Now another problem appears (I hope this is the last one), I still can't use the command java!! 

When I type pkg_info -x diablo, I see that the java Development Kit 1.6.0_07.02 is installed. Any idea about what is happening now??

Thanks again


----------



## mosquetero (Aug 25, 2009)

I didn't have internet but I downloaded the files with this computer and use an USB stick


----------



## graudeejs (Aug 25, 2009)

run rehash and try again
I bet you're using default shell (csh or tcsh)
After you install new apps on this shell you need to run *rehash*


----------



## mosquetero (Aug 25, 2009)

It works perfectly now! Thank you both of you, I really appreciated your help


----------

