bundle install komutunu calistirdigimda cikan hata, nasil duzeltebilirim ?:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
devami boyle:
current directory: /home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/gems/3.4.0/gems/pg-1.5.9/ext
/home/kuaza/.local/share/mise/installs/ruby/3.4.4/bin/ruby extconf.rb
Calling libpq with GVL unlocked
checking for pg_config... yes
Using config values from /usr/bin/pg_config
Using libpq from /usr/lib/x86_64-linux-gnu
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*****************************************************************************
Unable to find PostgreSQL client library.
Please install libpq or postgresql client package like so:
sudo apt install libpq-dev
sudo yum install postgresql-devel
sudo zypper in postgresql-devel
sudo pacman -S postgresql-libs
or try again with:
gem install pg -- --with-pg-config=/path/to/pg_config
or set library paths manually with:
gem install pg -- --with-pg-include=/path/to/libpq-fe.h/ --with-pg-lib=/path/to/libpq.so/
*** 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=${opt-dir}/include
--without-opt-include
--with-opt-lib=${opt-dir}/lib
--without-opt-lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/kuaza/.local/share/mise/installs/ruby/3.4.4/bin/$(RUBY_BASE_NAME)
--with-pg
--without-pg
--enable-gvl-unlock
--disable-gvl-unlock
--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=${pg-dir}/include
--without-pg-include
--with-pg-lib=${pg-dir}/lib
--without-pg-lib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/gems/3.4.0/extensions/x86_64-linux/3.4.0/pg-1.5.9/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/gems/3.4.0/gems/pg-1.5.9 for inspection.
Results logged to /home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/gems/3.4.0/extensions/x86_64-linux/3.4.0/pg-1.5.9/gem_make.out
/home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/site_ruby/3.4.0/rubygems/ext/builder.rb:125:in 'Gem::Ext::Builder.run'
/home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/site_ruby/3.4.0/rubygems/ext/ext_conf_builder.rb:30:in
'Gem::Ext::ExtConfBuilder.build'
/home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/site_ruby/3.4.0/rubygems/ext/builder.rb:206:in 'Gem::Ext::Builder#build_extension'
/home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/site_ruby/3.4.0/rubygems/ext/builder.rb:240:in 'block in
Gem::Ext::Builder#build_extensions'
/home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/site_ruby/3.4.0/rubygems/ext/builder.rb:237:in 'Array#each'
/home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/site_ruby/3.4.0/rubygems/ext/builder.rb:237:in 'Gem::Ext::Builder#build_extensions'
/home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/site_ruby/3.4.0/rubygems/installer.rb:844:in 'Gem::Installer#build_extensions'
/home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/rubygems_gem_installer.rb:111:in
'Bundler::RubyGemsGemInstaller#build_extensions'
/home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/rubygems_gem_installer.rb:30:in
'Bundler::RubyGemsGemInstaller#install'
/home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/source/rubygems.rb:220:in
'Bundler::Source::Rubygems#install'
/home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/installer/gem_installer.rb:55:in
'Bundler::GemInstaller#install'
/home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/installer/gem_installer.rb:17:in
'Bundler::GemInstaller#install_from_spec'
/home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/installer/parallel_installer.rb:133:in
'Bundler::ParallelInstaller#do_install'
/home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/installer/parallel_installer.rb:124:in
'block in Bundler::ParallelInstaller#worker_pool'
/home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/worker.rb:62:in
'Bundler::Worker#apply_func'
/home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/worker.rb:57:in 'block in
Bundler::Worker#process_queue'
<internal:kernel>:168:in 'Kernel#loop'
/home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/worker.rb:54:in
'Bundler::Worker#process_queue'
/home/kuaza/.local/share/mise/installs/ruby/3.4.4/lib/ruby/gems/3.4.0/gems/bundler-2.6.4/lib/bundler/worker.rb:90:in 'block (2 levels) in
Bundler::Worker#create_threads'
An error occurred while installing pg (1.5.9), and Bundler cannot continue.
In Gemfile:
pg