Проблема: gcc працює під рутом, але не працює під юзером.
Система:
motya@localhost ~ $ emerge --info
Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r4 i686)
=================================================================
System uname: Linux-2.6.30-gentoo-r4-i686-Intel-R-_Pentium-R-_4_CPU_2.80GHz-with-glibc2.0
Timestamp of tree: Wed, 29 Jul 2009 01:45:03 +0000
app-shells/bash: 3.2_p39
dev-lang/python: 2.5.4-r3
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox: 1.6-r2
sys-devel/autoconf: 2.63-r1
sys-devel/automake: 1.9.6-r2, 1.10.2
sys-devel/binutils: 2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool: 1.5.26
virtual/os-headers: 2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -mtune=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -mtune=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="uk ru us"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="7zip X acl alsa archive avahi berkdb bzip2 cleartype cli cracklib crypt cups dbus dri fortran gdbm gpm hal iconv isdnlog jpeg jpeg2000 mdnsresponder-compat midi mmx mng mudflap ncurses network network-manager networking nls nptl nptlonly opengl openmp pam pcre perl png pppd proxy python rar readline reflection samba session sound spl sse sse2 ssl svg sysfs tcpd tiff truetype unicode x86 xorg xscreensaver zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="uk ru us" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Не працює під юзером:
motya@localhost ~ $ gcc
gcc-config: error: could not run/locate 'gcc'
motya@localhost ~ $ gcc-config -l
[1] i686-pc-linux-gnu-4.3.2 *
ШЛЯХ під рутом:
localhost motya # echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin
gcc під рутом (все нормально):
localhost motya # gcc
gcc: no input files
Роблю ШЛЯХ для юзера таким як для рута (ну просто так...):
motya@localhost ~ $ echo $PATH
/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.3.2
motya@localhost ~ $ PATH=/sbin:/bin:/usr/sbin:/usr/bin
motya@localhost ~ $ echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin
motya@localhost ~ $ gcc
gcc-config: error: could not run/locate 'gcc'
Під рутом вся система компілюється нормально.
Гуглив гуглив... теж не допомогло... Шо робить? :-/