- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我在 Linux (CentOS) 系统中安装 PG 时遇到错误。
gem install pg
然后我得到以下错误
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
current directory: /usr/local/rvm/gems/ruby-2.3.0/gems/pg-0.18.4/ext
/usr/local/rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160831-5454-1endyls.rb extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/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=/usr/local/rvm/rubies/ruby-2.3.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:
/usr/local/rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/pg-0.18.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /usr/local/rvm/gems/ruby-2.3.0/gems/pg-0.18.4 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/pg-0.18.4/gem_make.out
为了解决这个问题,我尝试了很多东西并安装了所需的软件包,但仍然遇到同样的错误。你可以看到我的 postgres 日志*
运行后
yum list postgres*
Loaded plugins: priorities, update-motd, upgrade-helper
24 packages excluded due to repository priority protections
Installed Packages
postgresql92.x86_64 9.2.15-1.57.amzn1 @amzn-main
postgresql92-contrib.x86_64 9.2.15-1.57.amzn1 @amzn-main
postgresql92-devel.x86_64 9.2.15-1.57.amzn1 @amzn-main
postgresql92-libs.x86_64 9.2.15-1.57.amzn1 @amzn-main
postgresql92-server.x86_64 9.2.15-1.57.amzn1 @amzn-main
postgresql92-server-compat.x86_64 9.2.15-1.57.amzn1 @amzn-main
postgresql93.x86_64 9.3.11-1.61.amzn1 @amzn-main
postgresql93-contrib.x86_64 9.3.11-1.61.amzn1 @amzn-main
postgresql93-devel.x86_64 9.3.11-1.61.amzn1 @amzn-main
postgresql93-libs.x86_64 9.3.11-1.61.amzn1 @amzn-main
postgresql93-server.x86_64 9.3.11-1.61.amzn1 @amzn-main
postgresql94.x86_64 9.4.6-1.66.amzn1 @amzn-main
postgresql94-libs.x86_64 9.4.6-1.66.amzn1 @amzn-main
Available Packages
postgresql-jdbc.noarch 8.4.701-8.11.amzn1 amzn-main
postgresql-jdbc-javadoc.noarch 9.4.1208-1.rhel6 pgdg92
postgresql-odbc.x86_64 08.04.0200-1.6.amzn1 amzn-main
postgresql8.x86_64 8.4.20-5.52.amzn1 amzn-updates
postgresql8-contrib.x86_64 8.4.20-5.52.amzn1 amzn-updates
postgresql8-devel.x86_64 8.4.20-5.52.amzn1 amzn-updates
postgresql8-docs.x86_64 8.4.20-5.52.amzn1 amzn-updates
postgresql8-libs.i686 8.4.20-5.52.amzn1 amzn-updates
postgresql8-libs.x86_64 8.4.20-5.52.amzn1 amzn-updates
postgresql8-plperl.x86_64 8.4.20-5.52.amzn1 amzn-updates
postgresql8-plpython.x86_64 8.4.20-5.52.amzn1 amzn-updates
postgresql8-pltcl.x86_64 8.4.20-5.52.amzn1 amzn-updates
postgresql8-server.x86_64 8.4.20-5.52.amzn1 amzn-updates
postgresql8-test.x86_64 8.4.20-5.52.amzn1 amzn-updates
postgresql92-debuginfo.x86_64 9.2.18-1PGDG.rhel6 pgdg92
postgresql92-docs.x86_64 9.2.15-1.57.amzn1 amzn-main
postgresql92-libs.i686 9.2.15-1.57.amzn1 amzn-main
postgresql92-odbc.x86_64 09.05.0400-1PGDG.rhel6 pgdg92
postgresql92-plperl.x86_64 9.2.15-1.57.amzn1 amzn-main
postgresql92-plpython.x86_64 9.2.18-1PGDG.rhel6 pgdg92
postgresql92-plpython26.x86_64 9.2.15-1.57.amzn1 amzn-main
postgresql92-plpython27.x86_64 9.2.15-1.57.amzn1 amzn-main
postgresql92-pltcl.x86_64 9.2.15-1.57.amzn1 amzn-main
postgresql92-python.x86_64 4.2-1PGDG.rhel6 pgdg92
postgresql92-python-debuginfo.x86_64 4.2-1PGDG.rhel6 pgdg92
postgresql92-tcl.x86_64 2.1.1-1.rhel6 pgdg92
postgresql92-tcl-debuginfo.x86_64 2.1.1-1.rhel6 pgdg92
postgresql92-test.x86_64 9.2.15-1.57.amzn1 amzn-main
postgresql93-docs.x86_64 9.3.11-1.61.amzn1 amzn-main
postgresql93-libs.i686 9.3.11-1.61.amzn1 amzn-main
postgresql93-plperl.x86_64 9.3.11-1.61.amzn1 amzn-main
postgresql93-plpython26.x86_64 9.3.11-1.61.amzn1 amzn-main
postgresql93-plpython27.x86_64 9.3.11-1.61.amzn1 amzn-main
postgresql93-pltcl.x86_64 9.3.11-1.61.amzn1 amzn-main
postgresql93-test.x86_64 9.3.11-1.61.amzn1 amzn-main
postgresql94-contrib.x86_64 9.4.6-1.66.amzn1 amzn-main
postgresql94-devel.x86_64 9.4.6-1.66.amzn1 amzn-main
postgresql94-docs.x86_64 9.4.6-1.66.amzn1 amzn-main
postgresql94-libs.i686 9.4.6-1.66.amzn1 amzn-main
postgresql94-plperl.x86_64 9.4.6-1.66.amzn1 amzn-main
postgresql94-plpython26.x86_64 9.4.6-1.66.amzn1 amzn-main
postgresql94-plpython27.x86_64 9.4.6-1.66.amzn1 amzn-main
postgresql94-server.x86_64 9.4.6-1.66.amzn1 amzn-main
postgresql94-test.x86_64 9.4.6-1.66.amzn1 amzn-main
postgresql_autodoc.noarch 1.41-1.rhel6 pgdg92
无法安装 pg。请帮助我。
我安装了
yum install postgresql92-server
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main/latest | 2.1 kB 00:00
amzn-updates/latest | 2.3 kB 00:00
24 packages excluded due to repository priority protections
Package postgresql92-server-9.2.15-1.57.amzn1.x86_64 already installed and latest version
Nothing to do
最佳答案
看来您必须安装 postgres 头文件和库。因为你的系统是 RHEL 试试这个。
yum install postgresql-devel
如果你使用的是 postgres 9.4,那么,
yum install postgresql94-devel
然后重新运行 gem install pg 'version'
关于linux - PG + extconf 失败,在 Linux 中退出代码 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39251264/
我正在按照 http://people.apache.org/~rooneg/talks/ruby-extensions/ruby-extensions.html 的说明进行操作(第 6 页)我的 m
我有一个像这样组织的 ruby 扩展的小项目: ./ Rakefile ext/ mymodule/ extconf.rb mymodule.rb
我正在为 Ruby 写一个 C 扩展,我在 extconf.rb 文件中有这样的东西: if(not have_library('z')) $stderr << "Error, cou
我正在编写一个 Ruby C 扩展。我将在 Windows 和 OSX 下编译它。 我无法解决的问题是控制 makefile 和所有其他生成文件的放置位置。 我的 extconf.rb 文件有根据操作
我刚刚将 gcc 从默认的 4.2.1 更新到 4.5。但是当我运行 ruby extconf.rb 时,我创建了一个 gcc 无法识别的警告标志。 cc1: error: unrecognize
我将 macos 升级到 Mojave 并重新安装了 xcode、xcode CLT、ruby 等。然后当我尝试时: gem install nokogiri 我收到以下错误(安装其他 gem 时出现
在我的 extconf.rb 中,我有 $srcs = %w{foo.cpp bar.cpp} $objs = %w{foo bar} 其中每一个都依赖于多个头文件。如果我touch foo.cpp
我正在编写一个 Ruby 扩展,为此我有一个标准的 mkmf 配置脚本,但我需要向所有 C++ 编译步骤添加一个特殊的包含标志 (--std=c++0x)。我不想在 C 编译步骤中使用它,因为它会引发
我正在尝试围绕 C 扩展构建一个 ruby gem。使用 ruby extconf.rb 可以很好地编译 C 扩展;制作; sudo make install 例程,但是当我尝试使用 rake 构
我已经坚持了几天了,所以请帮忙! 我运行 MAC OS X(10.7.5),安装了 Xcode(4.5.2) 和命令行工具。 ruby 1.9.3-p362,RVM 1.17.8。 apple-gcc
对此很陌生,所以我一直在尝试解决这个问题,但无法找到答案。 gem update --system 安装 rb-appscript 时出现以下错误。 gem install rb-appscript
我正在构建一个具有各种第 3 方可执行要求的 Ruby gem 文件(该 gem 将通过系统调用使用的一些非 ruby 工具)。 需求列表是使用 gemspec 信息指定的 requirement
我正在发布我的 Ruby C/C++ 扩展,并尝试确保所有需要的库都列在 extconf.rb 中。我一直无法弄清楚如何需要 boost 库,尤其是 dynamic_bitset<> 类。 到目前为止
我是 Ruby on Rails 的新手,在安装时出现以下错误。 请注意,我已经安装了最新的 Xcode 和命令行工具,并且我使用的是 OSX 10.8.4。我也安装了 Ruby 2.0.0。 -ba
假设我要用命令编译一个C文件 g++ a.cpp -I/usr/local/gr/include -L/usr/local/gr/lib -lGR -lm -Wl,-rpath,/usr/local
我在 Linux (CentOS) 系统中安装 PG 时遇到错误。 gem install pg 然后我得到以下错误 Building native extensions. This could t
我有一个带有 C 扩展和 Java 扩展的 gem,它可以通过 rbenv 在 JRuby 中正常安装,但无法通过 RVM 安装在 JRuby 中。 gemspec and project are o
我在安装 Rails 时生成可执行文件时遇到运行时错误。 gem install rails -- --use-system-libraries 我检查过类似的 thread在这里,但就我而言,似乎没
我正在使用 Rice为 Ruby gem 编写 C++ 扩展。扩展名采用共享对象 (.so) 文件的形式。 这需要“mkmf-rice”而不是“mkmf”,但两者 (AFAIK) 非常相似。 默认情况
找不到这个问题的答案。 运行 OS X Yosemite Beta v2 遵循 compass 安装指南时,请确保您的 gem 是最新的 gem update --system 然后运行 gem in
我是一名优秀的程序员,十分优秀!