Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Aug 2016 06:40:58 +0800
From:      Ben Woods <woodsb02@gmail.com>
To:        Alnis Morics <alnis.m@mail.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: pkg-add for installing into a jail?
Message-ID:  <CAOc73CASD727Rao2sCMow3VYTWhUAkcdhQD7vsX7M8psOFYYWQ@mail.gmail.com>
In-Reply-To: <1997dd6e-1abd-4d4f-e95b-0f4679543a16@mail.com>
References:  <1997dd6e-1abd-4d4f-e95b-0f4679543a16@mail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday, 31 July 2016, Alnis Morics <alnis.m@mail.com> wrote:

> Hi,
>
> I could successfully use "pkg -j 1 <packagename>" many times to install
> packages onto a jail.
>
> But now I had to change an option in a port, so I built a package myself:
>
> portmaster -g www/apache22
>
> The package and its dependency was stored to /usr/ports/packages/All (as I
> set it in $PACKAGES):
>
> apache22-2.2.31_1.txz    apr-1.5.2.1.5.4.txz
>
> I can now install these packages using pkg-add on the host, but not onto
> the jail:
>
> test:/usr/ports/packages/All# pkg -j 1 add apache22-2.2.31_1.txz
> apr-1.5.2.1.5.4.txz
> pkg: apache22-2.2.31_1.txz: No such file or directory
> pkg: Was 'pkg install apache22-2.2.31_1.txz' meant?
> pkg: apr-1.5.2.1.5.4.txz: No such file or directory
> pkg: Was 'pkg install apr-1.5.2.1.5.4.txz' meant?
>
> Failed to install the following 2 package(s): apache22-2.2.31_1.txz,
> apr-1.5.2.1.5.4.txz
>
> If there is "No such file or directory", where does pkg look for them? (I
> also tried to use full path; the result is the same) Or is pkg-add an
> exception which doesn't work with -j option?
>
> -Alnis
>

It looks like the package you are trying to install is not in the directory
that pkg is running from within the jail. Either they are on the host
filesystem but not passed through to the jail, or pkg runs from a different
directory within the jail.

If you have your host system ports directory nullfs mounted inside the jail
also, this might be fixed by specifying the absolute path of the package.

# pkg -j 1 add /usr/ports/packages/All/apache22-2.2.31_1.txz
/usr/ports/packages/All/apr-1.5.2.1.5.4.txz

Check if your ports tree has the same directory inside the jail, and
contains these files.

Good luck!
Ben


-- 

--
From: Benjamin Woods
woodsb02@gmail.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOc73CASD727Rao2sCMow3VYTWhUAkcdhQD7vsX7M8psOFYYWQ>