環境
CentOS 7.9
Rails 5.1.0
ruby 2.4.0
デプロイをすると
bundle exec cap production deploy
下記エラーが出る
00:33 bundler:install 01 $HOME/.rbenv/bin/rbenv exec bundle install --path /home/w… 01 Gem::Ext::BuildError: ERROR: Failed to build gem native e… 01 01 current directory: 01 /home/webapps/abc/shared/bundle/ruby/2.4.0/gem… 01 /home/user/.rbenv/versions/2.4.0/bin/ruby -r 01 ./siteconf20210716-12875-1niw102.rb extconf.rb 01 checking for pg_config... no 01 No pg_config... trying anyway. If building fails, please … 01 --with-pg-config=/path/to/pg_config 01 checking for libpq-fe.h... no 01 Can't find the 'libpq-fe.h header 01 *** extconf.rb failed *** 01 Could not create Makefile due to some reason, probably la… 01 libraries and/or headers. Check the mkmf.log file for mo… 01 need configuration options. 01 01 Provided configuration options: 01 --with-opt-dir 01 --without-opt-dir 01 --with-opt-include 01 --without-opt-include=${opt-dir}/include 01 --with-opt-lib 01 --without-opt-lib=${opt-dir}/lib 01 --with-make-prog 01 --without-make-prog 01 --srcdir=. 01 --curdir 01 --ruby=/home/user/.rbenv/versions/2.4.0/bin/$(RUBY_BA… 01 --with-pg 01 --without-pg 01 --enable-windows-cross 01 --disable-windows-cross 01 --with-pg-config 01 --without-pg-config 01 --with-pg_config 01 --without-pg_config 01 --with-pg-dir 01 --without-pg-dir 01 --with-pg-include 01 --without-pg-include=${pg-dir}/include 01 --with-pg-lib 01 --without-pg-lib=${pg-dir}/lib 01 01 To see why this extension failed to compile, please check… 01 be found here: 01 01 /home/webapps/kit-downloader/shared/bundle/ruby/2.4.0/ext… 01 01 extconf failed, exit code 1 01 01 Gem files will remain installed in 01 /home/webapps/abc/shared/bundle/ruby/2.4.0/gem… 01 inspection. 01 Results logged to 01 /home/webapps/abc/shared/bundle/ruby/2.4.0/ext… 01 01 An error occurred while installing pg (0.21.0), and Bundl… 01 Make sure that `gem install pg -v '0.21.0'` succeeds befo… : : Results logged to /home/webapps/abc/shared/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/pg-0.21.0/gem_make.out An error occurred while installing pg (0.21.0), and Bundler cannot continue. Make sure that `gem install pg -v '0.21.0'` succeeds before bundling.
ググって色々試しましたがダメでした。
何か解決はありますでしょうか?
験したこと
sudo yum -y install mysql-devel bundle config build.pg --with-pg-config=/usr/pgsql-9.6/bin/pg_config bundle install --path vendor/bundle
pg(0.21.0)はインストールされており、参照の問題だと思うのですが、うまくいきません。
他に何かアドバスがあればご教授ください。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。