From owner-freebsd-questions@freebsd.org Sun Jan 10 09:32:58 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CB8FA6ADEB for ; Sun, 10 Jan 2016 09:32:58 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AA079109A for ; Sun, 10 Jan 2016 09:32:57 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from liminal.local (liminal.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3636:3bff:fed4:b0d6]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.15.2/8.15.2) with ESMTPSA id u0A9Wp1Y040017 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Sun, 10 Jan 2016 09:32:51 GMT (envelope-from matthew@FreeBSD.org) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org DKIM-Filter: OpenDKIM Filter v2.10.3 smtp.infracaninophile.co.uk u0A9Wp1Y040017 Authentication-Results: smtp.infracaninophile.co.uk/u0A9Wp1Y040017; dkim=none; dkim-atps=neutral X-Authentication-Warning: lucid-nonsense.infracaninophile.co.uk: Host liminal.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3636:3bff:fed4:b0d6] claimed to be liminal.local Subject: Re: "pkg: pkg is not installed" even after installing it To: freebsd-questions@freebsd.org References: <5691d97a.VHZI0elGOQrdG7+e%perryh@pluto.rain.com> From: Matthew Seaman X-Enigmail-Draft-Status: N1110 Message-ID: <56922538.7080105@FreeBSD.org> Date: Sun, 10 Jan 2016 09:32:40 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <5691d97a.VHZI0elGOQrdG7+e%perryh@pluto.rain.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pL6MjQo4tRI8IjgqVAcsafCNIUil7BBpu" X-Virus-Scanned: clamav-milter 0.99 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on lucid-nonsense.infracaninophile.co.uk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2016 09:32:58 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --pL6MjQo4tRI8IjgqVAcsafCNIUil7BBpu Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10/01/2016 04:09, Perry Hutchison wrote: > Why does it claim that pkg is not installed, when it just got through > installing it? Or, if the install failed part way through, why was the= re > no error message? And yes, the "pkg add" really did install something = -- > /mnt/usr/local/sbin did not exist before running "pkg add" -- and what = it > installed is at least partly functional: > # ls -lR /mnt/usr/local > total 1 > drwxrwxrwx 2 root wheel 512 Jan 9 18:11 pkg > drwxr-xr-x 2 perryh wheel 512 Jan 9 18:19 sbin > /mnt/usr/local/pkg: > total 2445 > -r--r--r-- 1 perryh perryh 2487404 Jul 29 18:13 pkg.txz > -r--r--r-- 1 perryh perryh 727 Jul 30 17:59 pkg.txz.sig > /mnt/usr/local/sbin: > total 4472 > -rwxr-xr-x 1 root wheel 4559004 Jul 29 18:13 pkg-static pkg(7) -- the shim that comes with the system -- is what produces the 'pkg is not installed' message. That's the result of checking that ${LOCALBASE}/sbin/pkg exists and is executable. ${LOCALBASE} defaults to /usr/local. It seems you have only /usr/local/sbin/pkg-static so your installation of pkg(8) -- the actual pkg software -- looks to have fallen over somewhere in the middle. pkg-static is pulled out of the pkg.txz tarball and installed first, then that copy of pkg-static is used to do a full install of the entire set of stuff comprising pkg(8) from the pkg.txz tarball. That includes the dynamically linked pkg binary and numerous man pages plus various other bits and pieces. What it seems you are missing is are writable /var/db/pkg/ and /var/cache/pkg directories -- this are where pkg(8) holds its database of what packages have been installed, and where it holds copies of the package tarballs, respectively. It's definitely a bug that your procedure fails without any sort of error message. There should be load complaints from pkg(8) that it cannot initialize the database, but somehow those are not making it through to your console. You should see some messages if you try running= : /usr/local/sbin/pkg-static add /usr/local/pkg/pkg.txz and that should show exactly what pkg(8) is having trouble with. Cheers, Matthew --pL6MjQo4tRI8IjgqVAcsafCNIUil7BBpu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2 iQJ8BAEBCgBmBQJWkiU/XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkAT+wcQAJJUcvGTmFdYTDQpRlTc5wX+ D0qAi9au12MtthghpJE2A42fw7DtDlfxhmRQVVDvC1Xj6mkt6pqJsBIU7B9UHrQP 0F2lxnYUj46oro+gviNU8N6uxJsmitTO5cyq+QVK23+1m9ylYw3vEZO0jwcC6Oof PFCFdCavonmMmJ92kG/v14EZM3vdZUar4jRPdZ22VqvPyoEHOBQLqYKenP7YqFde nnmPDTRIMbPLDU99/1+8AiuBSn/9O2heVAMtS+YnBitKphpohfhaBbCK/iVCj0p6 XKpm2ebCQkCL81oXEhCQtrXbgomeGS0g3M2ruF0ZB+BLZf/cMK8MVAsIM32ti8mb vB1TPUPClDcUO8Mx5JhlZspVb3mIqsVfsULxRMzpj4/Fdw3VfaYUr4EgczMQ7712 dN7n6VOo5RwkgykTQdkVjCP7qPSbLXJqZZQ7Oke/s1wdmkFfOUyhRCe7abyvvU1D rnxNX5ubo6yX9KDvvvNus5lk5BbXsTz6hVlnQRrL1aVKFntaJAWb5T/anPI0qpgj GqppbiNGKYFzlUBTBbs684MNXCi678z9LHlTd4cewGdBFobSlC+/WI90BvFJgvuB c0lYkzPrZpVGIECLBsjIDiJ4x6XWos1/nIouUvmoQ5ZzjVgTKpT15ytC1h6dYHvV HPuVF3/CnDFbPbzGhYUK =54w3 -----END PGP SIGNATURE----- --pL6MjQo4tRI8IjgqVAcsafCNIUil7BBpu--