4

I am trying to learn FreeBSD and have been trying to install xorg-minimal, gedit and libreoffice offline for a couple of weeks now (read manual) and just keep going around in circles. It is a new install of FreeBSD 10. Is there anyone here who will take the time to help and go through the basics for me?

I have saved xorg-minimal-7.5.2.tbz and gedit and libreoffice to disk and also succeeded in installing pkg-1.8.3.

During my last attempt, I edited a /usr/local/etc/pkg/repos/FreeBSD.conf like this:

FreeBSD: {
  enabled: no
}

and then edited /usr/local/etc/pkg/repos/<fileName>.conf like this:

file name: {
  url: file:///.../.../.../<packages>/
  enabled: yes
}

When I try to use pkg install, I get errors like these:

pkg: file:/.../.../meta.txz : No such file or directory
pkg: repository ... has no meta file,
pkg: file:/.../.../digests.txz: No such file or directory
pkg: ///xorg-minimal-7.5.2.tbz is not a valid package: no manifest found

Like I said, I have tried so many things, I am starting to feel a little punch drunk and it would not surprise me if I am leaving out some critical step.

0

2 Answers 2

5

pkg relies on various metadata files that you don't have on your local machine, because they are downloaded from a configured package repository. I think the best solution here is to revert to using the default FreeBSD repo, and simply use the pkg add command, which will attempt to install a package from a local package archive file, instead of pkg install, which will search your configured repos and attempt to install a package from a remote source.

Incidentally, you can also use pkg fetch to download package archive files from a configured repo, for installation later using pkg add:

# pkg fetch -d zsh

# pkg add /var/cache/pkg/zsh-5.0.7_2.txz

The -d flag to pkg fetch tells pkg to download any dependencies that may be required to successfully install the named package. Note that by default, packages downloaded in this manner are stashed in /var/cache/pkg, and you'll need to include the path to the archive file when you call pkg add.

1
  • 1
    Thanks for the answer. I tried installing Internet, but did not succeed. That's why I tried the offline route. I tried to vote up your answer, but I don't have enough reputation points here. Sorry about that! Thanks for the help!
    – summertime
    Jan 30, 2015 at 14:41
3

It is a very simple step that you have missed. Simply use the --no-repo-update option to pkg install. Make sure, when on-line, that your repository indexes are up-to-date, of course. And use pkg fetch or pkg install --fetch-only to fetch the package files when on-line, similarly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .