Errors with pkg_add
freebsd-questions-local at be-well.ilk.org
Thu Jun 5 14:51:50 UTC 2008
Phusion <phusion2k at 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
> Syntax error, command unrecognized
> pkg_add: unable to fetch
> 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
> 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
> setenv PACKAGESITE
> 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
More information about the freebsd-questions