From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: ktr01@protonmail.com
Subject: BUG #17348: Can never install pgsql on Ubuntu
Date: Tue, 28 Dec 2021 14:22:52 +0000
Message-ID: <17348-0bcee56252174285@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 17348
Logged by: KT LEE
Email address: ktr01@protonmail.com
PostgreSQL version: Unsupported/Unknown
Operating system: Windows 10
Description:
I use Win10 + Ubuntu 20.04 and build a website with Ruby on Rails. Whether I
changed the existing repo server to pg (in gemfile), or rails new specified
db as pg, I all encountered the following error message, followed by a
series of error message mazes. I once removed pg and reinstalled it. I have
also referred to all the answers on Stack Overflow. I have also asked
several questions, but none of them can be resolved.
If I try sudo apt-get install libpq-dev, I will encounter "E: Unable to
correct problems, you have held broken packages. ", and then go back to the
beginning of the problem. Compared to elephants, pg may be more like
ouroboros.
This is the question I asked:
https://stackoverflow.com/questions/70496525/cant-find-the-libpq-fe-h-headerhttps://stackoverflow.com/questions/70497607/there-is-no-response-to-the-command-to-install-postgres...https://stackoverflow.com/questions/70486509/cant-find-the-libpq-fe-h-header-cant-install-libpq-dev
This is my error message:
$ gem install pg -v '1.2.3' --source 'https://rubygems.org/';
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
current directory: /home/keaton/.rvm/gems/ruby-3.0.0/gems/pg-1.2.3/ext
/home/keaton/.rvm/rubies/ruby-3.0.0/bin/ruby -I
/home/keaton/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0 -r
./siteconf20211228-2714-f0chma.rb extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You
may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/keaton/.rvm/rubies/ruby-3.0.0/bin/$(RUBY_BASE_NAME)
--with-pg
--without-pg
--enable-windows-cross
--disable-windows-cross
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
To see why this extension failed to compile, please check the mkmf.log which
can be found here:
/home/keaton/.rvm/gems/ruby-3.0.0/extensions/x86_64-linux/3.0.0/pg-1.2.3/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/home/keaton/.rvm/gems/ruby-3.0.0/gems/pg-1.2.3 for inspection.
Results logged to
/home/keaton/.rvm/gems/ruby-3.0.0/extensions/x86_64-linux/3.0.0/pg-1.2.3/gem_make.out
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, ktr01@protonmail.com
Subject: Re: BUG #17348: Can never install pgsql on Ubuntu
In-Reply-To: <17348-0bcee56252174285@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox