Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Jun 2008 10:51:49 -0400
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        Phusion <phusion2k@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Errors with pkg_add
Message-ID:  <443ansrl2y.fsf@be-well.ilk.org>
In-Reply-To: <c3ed3fdc0806041527y336f3667k2e5560bd9c1a2f65@mail.gmail.com> (Phusion's message of "Wed\, 4 Jun 2008 17\:27\:09 -0500")
References:  <c3ed3fdc0806041527y336f3667k2e5560bd9c1a2f65@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Phusion <phusion2k@gmail.com> 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/



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