I ran intro this problem while I was installing Gentoo stage1 on my new computer. After finishing bootstrap emerge -ev system fails because of sys-app/attr. # emerge -v1 attr results in: /usr/bin/xgettext: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory and equery gives me this: # equery f expat [ Searching for packages matching expat... ] * Contents of dev-libs/expat-2.0.1: /usr /usr/bin /usr/bin/xmlwf /usr/include /usr/include/expat.h /usr/include/expat_external.h /usr/lib64 /usr/lib64/libexpat.a /usr/lib64/libexpat.la /usr/lib64/libexpat.so -> libexpat.so.1.5.2 /usr/lib64/libexpat.so.1 -> libexpat.so.1.5.2 /usr/lib64/libexpat.so.1.5.2 /usr/share /usr/share/doc /usr/share/doc/expat-2.0.1 /usr/share/doc/expat-2.0.1/Changes.bz2 /usr/share/doc/expat-2.0.1/README.bz2 /usr/share/doc/expat-2.0.1/html /usr/share/doc/expat-2.0.1/html/expat.png /usr/share/doc/expat-2.0.1/html/reference.html /usr/share/doc/expat-2.0.1/html/style.css /usr/share/doc/expat-2.0.1/html/valid-xhtml10.png /usr/share/man /usr/share/man/man1 /usr/share/man/man1/xmlwf.1.bz2 Creating the missing symlink fixed the problem for me. Reproducible: Always # emerge --info Portage 2.1.4.4 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.19-gentoo-r5 x86_64) ================================================================= System uname: 2.6.19-gentoo-r5 x86_64 Intel(R) Core(TM)2 Quad CPU Q9300 @ 2.50GHz Timestamp of tree: Wed, 28 May 2008 08:30:01 +0000 app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.6 dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.61-r1 sys-devel/automake: 1.9.6-r2, 1.10.1 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=nocona -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=nocona -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="ftp://mirror.muntinternet.net/pub/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://de-mirror.org/distro/gentoo/ ftp://213.186.33.37/gentoo-distfiles/" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" 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="X acl acpi alsa amd64 berkdb cdr cli cracklib crypt cups dbus dlloader dri dvd dvdr fbcon ffmpeg fortran gdbm glitz gnome gpm gtk gtk+ gtk2 hal iconv isdnlog java jpeg ldap midi mmx mmxext mudflap ncurses nls nptl nptlonly nvidia opengl openmp pam pcmcia pcre perl png pnp pppd python readline reflection sdl session spell spl sse sse2 ssl svg tcpd tetex threads truetype unicode usb vchroot vorbis xml xorg zlib" ALSA_CARDS="hda-intel usb-audio" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nv nvidia vesa" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
As hinted in red letters, "Gentoo Bugzilla" is not the correct product to file bugs regarding ebuilds.
Please read the following thread: http://forums.gentoo.org/viewtopic-t-575655.html