오류: Arch(postgresql)에서 gem 기본 확장을 빌드할 수 없습니다.

오류: Arch(postgresql)에서 gem 기본 확장을 빌드할 수 없습니다.

gem pg오류로 인해 Arch에 설치할 수 없습니다.

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /home/alex/.rvm/rubies/ruby-2.1.1/bin/ruby 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/alex/.rvm/rubies/ruby-2.1.1/bin/ruby
    --with-pg
    --without-pg
    --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

extconf failed, exit code 1

Gem files will remain installed in /home/alex/.rvm/gems/ruby-2.1.1/gems/pg-0.17.1 for inspection.
Results logged to /home/alex/.rvm/gems/ruby-2.1.1/extensions/x86_64-linux/2.1.0/pg-0.17.1/gem_make.out

그럼에도 불구하고 나는 그것을 설치했다 sudo pacman -S libmariadbclient. Ubuntu에서 이 오류가 발생했지만 pgdev(기억이 잘 나지 않음) 라이브러리를 설치하여 문제를 해결할 수 있었습니다. 문제는 이 라이브러리가 저장소에 아치용으로 존재하지 않거나 다르게 호출된다는 것입니다.

답변1

sudo pacman -S postgresql-libs

답변2

말한 바와 같이@craigringer에서 "libpq-fe.h"가 포함된 패키지를 검색하세요. 나는 다음을 달성하기 위해 pkgfile을 사용합니다.

pacman -S pkgfile
pkgfile --update
pkgfile --search libpq-fe.h

"postgresql-libs"를 반환합니다. 언급된 @inn0kenty로 패키지를 설치하세요.

방금 같은 문제가 발생하여 다음 단계를 사용하여 해결했습니다.

관련 정보