Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby Wagrant with Chef-配置VM时出错_Ruby_Postgresql_Chef Infra_Vagrant - Fatal编程技术网

Ruby Wagrant with Chef-配置VM时出错

Ruby Wagrant with Chef-配置VM时出错,ruby,postgresql,chef-infra,vagrant,Ruby,Postgresql,Chef Infra,Vagrant,我有一个困难的时间得到一个虚拟机设置与流浪汉 每当我使用vagrant>provision时,Chef都会失败: [2014-03-15T19:16:08+00:00]错误:chef_gem[pg](postgresql::ruby第39行)出现错误:gem::Installer::ExtensionBuildError:错误:无法生成gem本机扩展 > /opt/chef/embedded/bin/ruby extconf.rb checking for pg_config... yes

我有一个困难的时间得到一个虚拟机设置与流浪汉

每当我使用vagrant>provision时,Chef都会失败:

[2014-03-15T19:16:08+00:00]错误:chef_gem[pg](postgresql::ruby第39行)出现错误:gem::Installer::ExtensionBuildError:错误:无法生成gem本机扩展

> /opt/chef/embedded/bin/ruby extconf.rb checking for pg_config... yes
> Using config values from /usr/bin/pg_config checking for libpq-fe.h... yes
> checking for libpq/libpq-fs.h... yes 
> checking for pg_config_manual.h... yes checking for PQconnectdb() in -lpq... no
> checking for PQconnectdb() in -llibpq... no 
> checking for PQconnectdb() in -lms/libpq... no 
> Can't find the PostgreSQL client library (libpq)
> *** 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.
我很难理解在这里该做什么。我已经在虚拟机上手动安装了postgres,从cheffile中删除了postgres,但是Chef仍然失败


感谢您的帮助。

您需要在虚拟机上为pg gem安装postgres客户端库

您需要包括安装扩展的方法

> /opt/chef/embedded/bin/ruby extconf.rb checking for pg_config... yes
> Using config values from /usr/bin/pg_config checking for libpq-fe.h... yes
> checking for libpq/libpq-fs.h... yes 
> checking for pg_config_manual.h... yes checking for PQconnectdb() in -lpq... no
> checking for PQconnectdb() in -llibpq... no 
> checking for PQconnectdb() in -lms/libpq... no 
> Can't find the PostgreSQL client library (libpq)
> *** 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.