From owner-freebsd-pkg@freebsd.org Tue Apr 25 21:44:29 2017 Return-Path: Delivered-To: freebsd-pkg@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 0AE80D50A2E for ; Tue, 25 Apr 2017 21:44:29 +0000 (UTC) (envelope-from rfg@tristatelogic.com) Received: from outgoing.tristatelogic.com (segfault.tristatelogic.com [69.62.255.118]) by mx1.freebsd.org (Postfix) with ESMTP id E59B7C90 for ; Tue, 25 Apr 2017 21:44:28 +0000 (UTC) (envelope-from rfg@tristatelogic.com) Received: from segfault-nmh-helo.tristatelogic.com (localhost [127.0.0.1]) by segfault.tristatelogic.com (Postfix) with ESMTP id 679223AE87 for ; Tue, 25 Apr 2017 14:34:54 -0700 (PDT) From: "Ronald F. Guilmette" To: freebsd-pkg@freebsd.org Subject: Help please... Upgrade to pkg no workie Date: Tue, 25 Apr 2017 14:34:54 -0700 Message-ID: <83939.1493156094@segfault.tristatelogic.com> X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Apr 2017 21:44:29 -0000 This is rather embarassing, but OK, I confess... One of my systems here is running the ancient FreeBSD 9.1 and it hasn't been upgraded in a long long time. Like not at all. No package updates, nothing. Today however I desperately need to upgrade the installed Perl. (Apparently, the Perl that I have installed on this system, v5.16, has an old and not at all up-to-date Unicode implementation.) As you all know, fBSD 9.1 used the older package system. I am well and truly aware of the fact that, in order to move forward, I will need to upgrade to the new package system (pkg). So I've been reading this page that purports to give directions on exactly how to do that: https://www.freebsd.org/doc/handbook/pkgng-intro.html Unfortunately, for me at least, the guidance here raises nearly as many questions as it answers. For example, it says to do these two things: 1) Run pkg2ng. 2) Put a line like "WITH_PKGNG=yes" into /etc/make.conf What it doesn't say is whether the first thing must be done strictly *before* the second thing, or vise versa, or if the order here even matters at all. (I don't want to totally screw up my system, so in the absence of complete clarity, and since I don't really know exactly what the effects of either of these two steps really are, I am inclined to proceed with great caution and thus requast clarification from this list.) Anyway, I decided to look and see if perchance I might already have the new & improved pkg command on my system. So I did "which pkg" and lo and behold, an executable with that name is already present on this system as /usr/sbin/pkg. (I have no clear recollection, one way or the other, whether or not, in years past, I may have deliberately installed this /usr/sbin/pkg or not.) Anyway, I decided to throw the dice and run this, with no options or arguments, just to see if that would give me a list of command line options or what. I was almost immediately greeted with a message saying that the new pkg system was *not* in fact actually installed and asking me ([y/N]) if I wanted to install it. I control-C'd out of this, before I did any damage, and plotted my next move. I realized that to actually install this thing, I'd probably need to be root, so I su'd to root and then cd'd to ~root and started "script" so that I'd have a full log in case anything went wrong... which it promptly did. Here's the log. It isn't pretty. ============================================================================== root@segfault:/root # pkg The package management tool is not yet installed on your system. Do you want to fetch and install it now? [y/N]: y Bootstrapping pkg please wait Installing pkg-1.9.4_1... pkg-static: dup2(rootfd): Invalid argument Extracting pkg-1.9.4_1: 0% pkg-static: Fail to create /usr: Bad file descriptor Extracting pkg-1.9.4_1: 100% Failed to install the following 1 package(s): /tmp//pkg.txz.q9abRX root@segfault:/root # exit ============================================================================== So? NOW what should I do? Any & all advice appreciated. (I still desperately need to get Perl upgraded.)