pkg_add not working

I've just finished the basic installation of FreeBSD from a DVD, and I'm now trying to install Gnome from the DVD using pkg_add. If I run
Code:
# pkg_add -v -n gnome2
I get the error
Code:
pkg_add: Can't stat package file 'gnome2'
If I change to the directory on the DVD containing the packages and run
Code:
# pkg_add -v -n gnome2-2.32.1_3.tbz
it gives "was not found" errors for every dependency. Any idea what's going wrong?
 
pkg_add of gnome is lengthy and multi-stage even if one is connected to the internet, and has done it many times before. It is not something I'd want to do outside of the ports tree using a pkg management tool (portmaster, portmanager, portupgrade...
 
jb_fvwm2 said:
pkg_add of gnome is lengthy and multi-stage even if one is connected to the internet, and has done it many times before. It is not something I'd want to do outside of the ports tree using a pkg management tool (portmaster, portmanager, portupgrade...

Does this mean that pkg_add is unable to properly resolve dependencies, or are you saying something else?
 
I've never had the chance to use it to install more than a single port or package at a time, relying on portmaster or local .tbz files... surmising that all dependencies have already been installed. Back when I first installed from cd, I installed relatively simple ports and went slowly from there, mostly using portupgrade and the ports tree.
 
Make sure you are in the directory containing all the packages when using pkg_add.

It shouldn't result in errors, I regularly pkg_add packages with a lot of dependencies.
 
Starting from a fresh boot:
Code:
# mnt -t cd9660 /dev/iso9660/FREEBSD_INSTALL /mnt
# cd /mnt/packages/All
# pkg_add -n -v bash
pkg_add: can't stat package file 'bash'
pkg_add: 1 package addition(s) failed
# pkg_add -n -v bash-4.1.11.tbz
Requested space: 3822k bytes, free space: 12G bytes in /var/tmp/instmp.bmZ9AK
Package 'bash-4.1.11' depends on 'libiconv-1.13.1_1 with 'converters/libiconv' origin.
and was not found.
Package 'bash-4.1.11' depends on 'gettext-0.18.1.1' with 'devel/gettext' origin.
and was not found.
pkg_add: 1 package addition(s) failed

I get the same results regardless of if I run pkg_add from /mnt/packages, /mnt/packages/All, or /mnt/packages/shells.
 
Are libiconv-1.13.1_1.tbz and gettext-0.18.1.1.tbz actually on the CD/DVD?
 
Carnildo said:
If I change to the directory on the DVD containing the packages and run
Code:
# pkg_add -v -n gnome2-2.32.1_3.tbz
it gives "was not found" errors for every dependency. Any idea what's going wrong?

Try changing to the All ports directory and add the package from there (considering your DVD is mounted under /mnt):
# cd /mnt/packages/All
# pkg_add gnome2-2.32.1_3.tbz
 
  1. Open the "All" directory;
  2. Search for the exact file versions (ls libiconv-1.* and ls gettext-0*) as the libiconv and gettext versions compiled against GNOME may be slightly different from the ones included;
  3. Install them;
  4. Force install GNOME using the -f option.
HTH
 
SirDice said:
Are libiconv-1.13.1_1.tbz and gettext-0.18.1.1.tbz actually on the CD/DVD?

Yes.

izotov said:
Try changing to the All ports directory and add the package from there (considering your DVD is mounted under /mnt):
# cd /mnt/packages/All
# pkg_add gnome2-2.32.1_3.tbz

Tried that, it didn't work.

Beastie said:
  1. Open the "All" directory;
  2. Search for the exact file versions (ls libiconv-1.* and ls gettext-0*) as the libiconv and gettext versions compiled against GNOME may be slightly different from the ones included;
  3. Install them;
  4. Force install GNOME using the -f option.
HTH

That's a viable option for Bash, with two dependencies. It's not viable for Gnome, with dozens if not hundreds of dependencies.
 
I figured it out: use of the "-n" (dry run) option renders pkg_add unable to resolve dependencies. Is this a known bug, or should I report it?
 
Back
Top