Hi, all. I need to install postgresql18-{client,contrib,server} packages to a different location on a test machine, then copy all its files & directories to the needed machine, so that pg_upgrade from an earlier version of PG, which is installed there as packages, works. The pg_upgrade manual states this:
But this doesn't work. After some googling I changed prefix in the command above to be upper case PREFIX, and then do this:
But after the build completes it fails with many errors of this kind:
My first idea was simply to install packages normally, and copy all their files (as determined by "pkg -l packagename") to the needed machine, it seemingly works, but there are library issues with needed symbols not being found in /usr/local/lib/libpq.so.5 which is from older postgresql-client package, while psql 18 depends on the file copied, and I couldn't get libmap.conf to make ldd happy and route that library to the new version's path).
Code:
3. Install the new PostgreSQL binaries: Install the new server's
binaries and support files. pg_upgrade is included in a default
installation.
For source installs, if you wish to install the new server in a
custom location, use the prefix variable:
make prefix=/usr/local/pgsql.new install
But this doesn't work. After some googling I changed prefix in the command above to be upper case PREFIX, and then do this:
Code:
cd /usr/ports/databases/postgresql18-client
sudo make PREFIX=/usr/local/pgsql.new install
But after the build completes it fails with many errors of this kind:
Code:
pkg-static: Unable to access file /usr/ports/databases/postgresql18-client/work/stage/usr/local/pgsql.new/lib/postgresql/pgxs/src/Makefile.shlib:No such file or directory
pkg-static: Unable to access file /usr/ports/databases/postgresql18-client/work/stage/usr/local/pgsql.new/lib/postgresql/pgxs/src/makefiles/pgxs.mk:No such file or directory
pkg-static: Unable to access file /usr/ports/databases/postgresql18-client/work/stage/usr/local/pgsql.new/lib/postgresql/pgxs/src/nls-global.mk:No such file or directory
pkg-static: Unable to access file /usr/ports/databases/postgresql18-client/work/stage/usr/local/pgsql.new/lib/postgresql/pgxs/src/test/regress/pg_regress:No such file or directory
pkg-static: Unable to access file /usr/ports/databases/postgresql18-client/work/stage/usr/local/pgsql.new/share/postgresql/postgres.bki:No such file or directory
pkg-static: Unable to access file /usr/ports/databases/postgresql18-client/work/stage/usr/local/pgsql.new/share/postgresql/system_constraints.sql:No such file or directory
pkg-static: Unable to access file /usr/ports/databases/postgresql18-client/work/stage/usr/local/pgsql.new/share/postgresql/pg_service.conf.sample:No such file or directory
pkg-static: Unable to access file /usr/ports/databases/postgresql18-client/work/stage/usr/local/pgsql.new/share/postgresql/psqlrc.sample:No such file or directory
My first idea was simply to install packages normally, and copy all their files (as determined by "pkg -l packagename") to the needed machine, it seemingly works, but there are library issues with needed symbols not being found in /usr/local/lib/libpq.so.5 which is from older postgresql-client package, while psql 18 depends on the file copied, and I couldn't get libmap.conf to make ldd happy and route that library to the new version's path).