From owner-freebsd-questions@FreeBSD.ORG Thu Jun 5 14:51:50 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E17E1065676 for ; Thu, 5 Jun 2008 14:51:50 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from be-well.ilk.org (dsl092-078-145.bos1.dsl.speakeasy.net [66.92.78.145]) by mx1.freebsd.org (Postfix) with ESMTP id 18F218FC1F for ; Thu, 5 Jun 2008 14:51:50 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: by be-well.ilk.org (Postfix, from userid 1147) id 8A1F528490; Thu, 5 Jun 2008 10:51:49 -0400 (EDT) To: Phusion References: From: Lowell Gilbert Date: Thu, 05 Jun 2008 10:51:49 -0400 In-Reply-To: (Phusion's message of "Wed\, 4 Jun 2008 17\:27\:09 -0500") Message-ID: <443ansrl2y.fsf@be-well.ilk.org> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: Errors with pkg_add X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2008 14:51:50 -0000 Phusion writes: > I am running FreeBSD 7.0-STABLE i386 and am having problems with > pkg_add. I can install packages as the root user without problems. > > - pkg_add -r packages, works when running as root > - pkg_add -r packages, errors out when using sudo > > % sudo pkg_add -r openssl > Error: FTP Unable to get > ftp://ftp4.us.freebsd.org/pub/FreeBSD/ports/i386/packages-7-stable/Latest/openssl.tbz: > Syntax error, command unrecognized > pkg_add: unable to fetch > 'ftp://ftp4.us.freebsd.org/pub/FreeBSD/ports/i386/packages-7-stable/Latest/openssl.tbz' > by URL > > % cat /usr/local/etc/sudoers > Defaults env_keep += "PKG_PATH PKG_DBDIR PKG_TMPDIR TMPDIR > PACKAGEROOT PACKAGESITE PKGDIR" > Defaults env_keep += "PORTSDIR PORTS_INDEX PORTS_DBDIR PACKAGES > PKGTOOLS_CONF" > root ALL=(ALL) ALL > %wheel ALL=(ALL) NOPASSWD: ALL > > This user is a member of the wheel group so no password is required. > Both this user and root user are using the csh with the following in > .cshrc. > > setenv PACKAGESITE > ftp://ftp4.us.freebsd.org/pub/FreeBSD/ports/i386/packages-7-stable/Latest/ > > Let me know if you have any ideas. Thanks. sudo may not be setting up the environment correctly. I seem to recall it recently changed defaults to wiping out more of the caller's environment than had previously been the case. -- Lowell Gilbert, embedded/networking software engineer, Boston area http://be-well.ilk.org/~lowell/