Trying to install emerge new postgresql --config but it fails emerge --config =dev-db/postgresql-server-9.0.3 ... * Initializing the database ... initdb: file "/usr/share/postgresql-8.4/postgres.bki" does not exist This might mean you have a corrupted installation or identified the wrong directory with the invocation option -L. The above error message is with postgresql-8.4 removed. When I had it still installed I got an error message as well. creating configuration files ... ok creating template1 database in /var/lib/postgresql/9.0/data/base/1 ... initdb: input file "/usr/share/postgresql-8.4/postgres.bki" does not belong to PostgreSQL 9.0.3 It seems to me it is looking for the file postgres.bki in a wrong directory it should be in directory. "/usr/share/postgresql-9.0 Reproducible: Always Portage 2.1.9.25 (default/linux/x86/10.0/desktop, gcc-4.4.4, glibc-2.11.2-r3, 2.6.36-gentoo-r5 i686) ================================================================= System uname: Linux-2.6.36-gentoo-r5-i686-AMD_Athlon-TM-_XP_2500+-with-gentoo-1.12.14 Timestamp of tree: Wed, 16 Feb 2011 02:00:01 +0000 distcc 3.1 i686-pc-linux-gnu [disabled] ccache version 2.4 [disabled] app-shells/bash: 4.1_p9 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.6.6-r1, 3.1.2-r4 dev-util/ccache: 2.4-r9 dev-util/cmake: 2.8.1-r2 sys-apps/baselayout: 1.12.14-r1 sys-apps/sandbox: 2.4 sys-devel/autoconf: 2.13, 2.65-r1 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.1.2, 4.4.4-r2 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.10 sys-devel/make: 3.81-r2 virtual/os-headers: 2.6.36.1 (sys-kernel/linux-headers) ACCEPT_KEYWORDS="x86" ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib/fax /usr/share/config /usr/share/openvpn/easy-rsa /var/spool/fax/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs collision-protect distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="http://distro.ibidio.org/pub/linux/distributions/gentoo/ ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://gentoo.osuosl.org/ http://mirror.datapipe.net/gentoo http://gentoo.binarycompass.org" LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en en_US" MAKEOPTS="-j4" 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" PORTDIR_OVERLAY="/var/lib/layman/kde-sunset" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac acpi alsa apache2 berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac foomaticdb fortran gdbm gdu gif gpm gtk hal iconv ipv6 java jpeg kde kpathsea lcms ldap libnotify mad mikmod mng modules mp3 mp4 mpeg mudflap mysql ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png policykit ppds pppd python qt3support qt4 readline scanner sdl session spell ssl startup-notification svg sysfs tcpd tetex tiff truetype type1 udev unicode usb vorbis x264 x86 xcb xml xorg xulrunner xv xvid zlib" ALSA_CARDS="via82xx" 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 auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias cgi" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nv vesa fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
user has to run: eselect postgresql set 9.0 before emerging "postgresql-server-9.0.3" so the links get correctly configured. I wish there was some note about it before emerging postgresql-server
(In reply to comment #1) > user has to run: > eselect postgresql set 9.0 > > before emerging "postgresql-server-9.0.3" so the links get correctly > configured. > I wish there was some note about it before emerging postgresql-server before ? How weird it is. The eselect script should be fixed then...
(In reply to comment #1) > user has to run: > eselect postgresql set 9.0 > > before emerging "postgresql-server-9.0.3" so the links get correctly > configured. You meant /after/ emerging postgresql-server and /before/ running emerge --config, I guess. Maybe pkg_config() should be made aware of what eselect postgresql is set to, and act accordingly, so assigning anyway.
(In reply to comment #3) > (In reply to comment #1) > > user has to run: > > eselect postgresql set 9.0 > > > > before emerging "postgresql-server-9.0.3" so the links get correctly > > configured. > > You meant /after/ emerging postgresql-server and /before/ running emerge > --config, I guess. No, Joseph is right. I had the exactly same error. I confirm that re-emerging postgresql-server after changing the version through eselect fixed the /use/share issue. It took me some time to be able to run pg_upgrade from my 8.4.5 installation to the 9.0.3.
Oddly enough, I cannot reproduce the problem. elmer ~ # emerge --config =dev-db/postgresql-server-9.0.3 Configuring pkg... * You can pass options to initdb by setting the PG_INITDB_OPTS variable. * More information can be found here: * http://www.postgresql.org/docs/9.0/static/creating-cluster.html * http://www.postgresql.org/docs/9.0/static/app-initdb.html * Simply add the options you would have added to initdb to the PG_INITDB_OPTS * variable. * * You can change the directory where the database cluster is being created by * setting the PGDATA variable. * * PG_INITDB_OPTS is currently set to: * "" * and the database cluster will be created in: * "/var/lib/postgresql/9.0/data" * Are you ready to continue? (Y/n) * Checking system parameters... * Checking whether your system supports at least 128 connections... * Passed. * Creating the data directory ... * Initializing the database ... The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale en_US.UTF-8. The default database encoding has accordingly been set to UTF8. The default text search configuration will be set to "english". fixing permissions on existing directory /var/lib/postgresql/9.0/data ... ok creating subdirectories ... ok selecting default max_connections ... 100 selecting default shared_buffers ... 28MB creating configuration files ... ok creating template1 database in /var/lib/postgresql/9.0/data/base/1 ... ok initializing pg_authid ... ok initializing dependencies ... ok creating system views ... ok loading system objects' descriptions ... ok creating conversions ... ok creating dictionaries ... ok setting privileges on built-in objects ... ok creating information schema ... ok loading PL/pgSQL server-side language ... ok vacuuming database template1 ... ok copying template1 to template0 ... ok copying template1 to postgres ... ok WARNING: enabling "trust" authentication for local connections You can change this by editing pg_hba.conf or using the -A option the next time you run initdb. Success. You can now start the database server using: /usr/lib/postgresql-9.0/bin/postgres -D /var/lib/postgresql/9.0/data or /usr/lib/postgresql-9.0/bin/pg_ctl -D /var/lib/postgresql/9.0/data -l logfile start * * You can use the '//etc/init.d/postgresql-9.0' script to run PostgreSQL * instead of 'pg_ctl'. * elmer ~ # post postcard.sh post-grohtml postgres postmaster postgresql-config postmodern postgresql-remove-stupid-symlinks elmer ~ # postgres --version postgres (PostgreSQL) 8.4.7 elmer ~ # . /etc/profile elmer ~ # postgres --version postgres (PostgreSQL) 8.4.7 elmer ~ # eselect postgresql list Available postgresql installations 8.2 base-8.2.20 docs-8.2.20 server-8.2.20 8.3 base-8.3.14 docs-8.3.14 server-8.3.14 8.4 <-* <-S base-8.4.7 docs-8.4.7 server-8.4.7 9.0 base-9.0.3 docs-9.0.3 server-9.0.3
I'm not sure what the precise problem is here. I've never had this issue before, and doing an 'eselect postgresql set 9.0' should have no bearing here. This may, however, be related to bug 355945. I'll be doing a large update shortly that includes the fix to that bug and may fix this bug.
Having the same issue here.. I even re-emerged postgresql-server 8.4 *and* 9.0 even after eselect postgresql set 8.4 # did this the 2nd time to make sure eselect wasn'T just buggered up .. eselect postgresql set 9.0 emerge --config dev-db/postgresql-server:9.0 gives me this: Configuring pkg... * You can modify the paths and options passed to initdb by editing: * * * Information on options that can be passed to initdb are found at: * http://www.postgresql.org/docs/9.0/static/creating-cluster.html * http://www.postgresql.org/docs/9.0/static/app-initdb.html * * PG_INITDB_OPTS is currently set to: * -E UTF8 * * Configuration files will be installed to: * /etc/postgresql-9.0/ * * The database cluster will be created in: * /var/lib/postgresql/9.0/data * * Are you ready to continue? (Y/n) y * Checking system parameters... * Checking whether your system supports at least 128 connections... * Passed. * Creating the data directory ... * Initializing the database ... Die Dateien, die zu diesem Datenbanksystem gehören, werden dem Benutzer »postgres« gehören. Diesem Benutzer muss auch der Serverprozess gehören. Der Datenbankcluster wird mit der Locale de_AT.UTF-8 initialisiert werden. Die Standardtextsuchekonfiguration wird auf »german« gesetzt. berichtige Zugriffsrechte des bestehenden Verzeichnisses /var/lib/postgresql/9.0/data ... ok erzeuge Unterverzeichnisse ... ok wähle Vorgabewert für max_connections ... 100 wähle Vorgabewert für shared_buffers ... 24MB erzeuge Konfigurationsdateien ... ok erzeuge Datenbank template1 in /var/lib/postgresql/9.0/data/base/1 ... initdb: Eingabedatei »/usr/share/postgresql-8.4/postgres.bki« gehört nicht zu PostgreSQL 9.0.3 Prüfen Sie Ihre Installation oder geben Sie den korrekten Pfad mit der Option -L an. initdb: entferne Inhalt des Datenverzeichnisses »/var/lib/postgresql/9.0/data« mv: Aufruf von stat für â/var/lib/postgresql/9.0/data/*.confâ nicht möglich: Datei oder Verzeichnis nicht gefunden * The autovacuum function, which was in contrib, has been moved to the main * PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled by * default. You can disable it in the cluster's: * /etc/postgresql-9.0/postgresql.conf * * The PostgreSQL server, by default, will log events to: * /var/lib/postgresql/9.0/data/postmaster.log * * You should use the '/etc/init.d/postgresql-9.0' script to run PostgreSQL * instead of 'pg_ctl'. -- sorry for the german, it completely ignores my LC_ALL and LANG settings cuz of the su - postgres call .. basically it complains about the file being wrong version and bla bla like the previous comments
in addition manually running initdb90 has same problem: postgres@Desktop64X3 ~ $ LC_ALL=C LANG=C initdb90 -E UTF-8 The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale C. The default text search configuration will be set to "english". fixing permissions on existing directory /var/lib/postgresql/9.0/data ... ok creating subdirectories ... ok selecting default max_connections ... 100 selecting default shared_buffers ... 24MB creating configuration files ... ok creating template1 database in /var/lib/postgresql/9.0/data/base/1 ... initdb90: input file "/usr/share/postgresql-8.4/postgres.bki" does not belong to PostgreSQL 9.0.3 Check your installation or specify the correct path using the option -L. initdb90: removing contents of data directory "/var/lib/postgresql/9.0/data"
@TitanOfOld: as you suggested on irc I tried this(and it worked): PGDATA=/var/lib/postgresql/9.0/data LC_ALL=C LANG=C initdb90 -E UTF-8 -L /usr/share/postgresql-9.0 The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale C. The default text search configuration will be set to "english". fixing permissions on existing directory /var/lib/postgresql/9.0/data ... ok creating subdirectories ... ok selecting default max_connections ... 100 selecting default shared_buffers ... 24MB creating configuration files ... ok creating template1 database in /var/lib/postgresql/9.0/data/base/1 ... ok initializing pg_authid ... ok initializing dependencies ... ok creating system views ... ok loading system objects' descriptions ... ok creating conversions ... ok creating dictionaries ... ok setting privileges on built-in objects ... ok creating information schema ... ok loading PL/pgSQL server-side language ... ok vacuuming database template1 ... ok copying template1 to template0 ... ok copying template1 to postgres ... ok WARNING: enabling "trust" authentication for local connections You can change this by editing pg_hba.conf or using the -A option the next time you run initdb. Success. You can now start the database server using: postgres -D /var/lib/postgresql/9.0/data or pg_ctl -D /var/lib/postgresql/9.0/data -l logfile start
There's one thing I want to check before I implement the -L as the fix in the ebuilds. Please post the output of: pg_config90 --sharedir
sorry, didn't notice the comment here and now i'm away until wednesday evening. I'll try to remember (since I didn't have teh problem on my laptop - i think). but if I forget please just drop me a mail to remind me ;)
I ran into this problem as well. At first I had only postgres-(base/server):9.00 installed and tried pulling the initdb call out by itself: su postgres -c "/usr/lib64/postgresql-9.0/bin/initdb --pgdata \"/var/lib/postgresql/9.0/data\" --locale=en_US.UTF-8" initdb: file "/usr/share/postgresql-8.4/postgres.bki" does not exist This might mean you have a corrupted installation or identified the wrong directory with the invocation option -L. Using eselect to set things to the (one existing) current version didn't help. So I decided to try installing base/server:8.4 as well, then use eselect to make sure that 9.0 was selected. This time I got the following: su postgres -c "/usr/lib64/postgresql-9.0/bin/initdb --pgdata /var/lib/postgresql/9.0/data --locale=en_US.UTF-8" The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale en_US.UTF-8. The default database encoding has accordingly been set to UTF8. The default text search configuration will be set to "english". fixing permissions on existing directory /var/lib/postgresql/9.0/data ... ok creating subdirectories ... ok selecting default max_connections ... 100 selecting default shared_buffers ... 24MB creating configuration files ... ok creating template1 database in /var/lib/postgresql/9.0/data/base/1 ... initdb: input file "/usr/share/postgresql-8.4/postgres.bki" does not belong to PostgreSQL 9.0.3 Check your installation or specify the correct path using the option -L. initdb: removing contents of data directory "/var/lib/postgresql/9.0/data" So it got further with having two versions installed, but not completely, and possibly by using wrong data files during the initialization. Here's my pg_config -- I don't have a pg_config90: BINDIR = /usr/lib64/postgresql-9.0/bin DOCDIR = /usr/share/doc/postgresql-9.0 HTMLDIR = /usr/share/doc/postgresql-9.0 INCLUDEDIR = /usr/include/postgresql-9.0 PKGINCLUDEDIR = /usr/include/postgresql-9.0 INCLUDEDIR-SERVER = /usr/include/postgresql-9.0/server LIBDIR = /usr/lib64/postgresql-9.0/lib64 PKGLIBDIR = /usr/lib64/postgresql-9.0/lib64 LOCALEDIR = /usr/lib64/postgresql-9.0/share/locale MANDIR = /usr/share/postgresql-9.0/man SHAREDIR = /usr/share/postgresql-9.0 SYSCONFDIR = /etc/postgresql-9.0 PGXS = /usr/lib64/postgresql-9.0/lib64/pgxs/src/makefiles/pgxs.mk CONFIGURE = '--prefix=/usr' '--build=x86_64-pc-linux-gnu' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--libdir=/usr/lib64/postgresql-9.0/lib64' '--prefix=/usr/lib64/postgresql-9.0' '--datadir=/usr/share/postgresql-9.0' '--docdir=/usr/share/doc/postgresql-9.0' '--sysconfdir=/etc/postgresql-9.0' '--includedir=/usr/include/postgresql-9.0' '--mandir=/usr/share/postgresql-9.0/man' '--enable-depend' '--without-tcl' '--without-perl' '--without-python' '--with-readline' '--with-krb5' '--with-gssapi' '--enable-nls' '--with-pam' '--enable-integer-datetimes' '--with-openssl' '--disable-thread-safety' '--with-zlib' '--with-ldap' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-mtune=core2 -O2 -pipe' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' 'LDFLAGS_SL=-Wl,-O1 -Wl,--as-needed' CC = x86_64-pc-linux-gnu-gcc CPPFLAGS = -D_GNU_SOURCE CFLAGS = -mtune=core2 -O2 -pipe -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv CFLAGS_SL = -fpic LDFLAGS = -Wl,-O1 -Wl,--as-needed -Wl,--as-needed -Wl,-rpath,'/usr/lib64/postgresql-9.0/lib64',--enable-new-dtags LDFLAGS_EX = LDFLAGS_SL = -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed LIBS = -lpgport -lpam -lssl -lcrypto -lkrb5 -lcom_err -lgssapi_krb5 -lz -lreadline -lcrypt -ldl -lm VERSION = PostgreSQL 9.0.3
20 May 2011; Aaron W. Swenson <titanofold@gentoo.org> +postgresql-server-8.2.21-r1.ebuild, +postgresql-server-8.3.15-r1.ebuild, +postgresql-server-8.4.8-r1.ebuild, +postgresql-server-9.0.4-r1.ebuild, +postgresql-server-9.1_beta1-r1.ebuild: Fixes bugs 366713 and 355245. Added "en" to LINGUAS so those who have specified "en" will not build all languages. Removed inexplicable dependency on dev-python/egenix-mx-base.