Code Monkey home page Code Monkey logo

cookbooks's Introduction

DESCRIPTION

collection of chef cookbooks written by me, check out stable versions at http://community.opscode.com/users/melezhik

  • apache - various apache related resources providers (LWRP)
  • catalyst - catalyst application provider (LWRP)
  • catalyst-fastcgi - configures catalyst as fastcgi server and configure apache virtual host for it
  • cpan - cpan modules provider (LWRP)
  • dry-run - run chef templates in dry-run mode
  • nginx-fastcgi - create nginx site to run your fastcgi application under nginx front-end
  • psgi - configures and runs psgi application
  • cpanminus - installs cpanminus client
  • pinto - installs, configures pinto

LINKs

cookbooks's People

Contributors

funzoneq avatar melezhik avatar redterror avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cookbooks's Issues

Prompt for intervention when chef-client run

Hi melezhik ,

Chef-client prompt me to enter text when installing cpan :

hu, 11 Oct 2012 11:54:49 +0200] INFO: execute[rm /tmp/local-lib/Term::ReadLine::Perl-install.log] ran successfully
[Thu, 11 Oct 2012 11:54:49 +0200] INFO: Processing bash[checking if module exists at CPAN] action run (/var/chef/cache/cookbooks/cpan/providers/client.rb line 387)
Reading '/root/.cpan/Metadata'
Database was generated on Thu, 11 Oct 2012 05:07:03 GMT
[Thu, 11 Oct 2012 11:54:52 +0200] INFO: bash[checking if module exists at CPAN] ran successfully
[Thu, 11 Oct 2012 11:54:52 +0200] INFO: Processing bash[installing cpan module] action run (/var/chef/cache/cookbooks/cpan/providers/client.rb line 419)
Features present: preput 1 getHistory 1 addHistory 1 attribs 1 ornaments 1 appname 1 minline 1 autohistory 1 newTTY 1 tkRunning 1 setHistory 1

Flipping rl_default_selected each line.

Hint: Entering the word
    exit
would exit the test. ;-)  (If feature 'preput' is present,
this word should be already entered.)

Enter arithmetic or Perl expression: exit
[Thu, 11 Oct 2012 11:55:44 +0200] INFO: bash[installing cpan module] ran successfully
[Thu, 11 Oct 2012 11:55:44 +0200] INFO: Processing ruby_block[install-log] action create (/var/chef/cache/cookbooks/cpan/providers/client.rb line 88)

Term::ReadLine::Perl install summary <<<
/usr/bin/make -- OK [ILYAZ/modules/Term-ReadLine-Perl-1.0303.tar.gz]
/usr/bin/make test -- OK [ILYAZ/modules/Term-ReadLine-Perl-1.0303.tar.gz]
/usr/bin/make install -- OK [ILYAZ/modules/Term-ReadLine-Perl-1.0303.tar.gz]

Default CentOS sudoers file breaks CPAN

This isn't the cookbook's fault but you should include a note to say that requiretty in the default CentOS sudoers file breaks CPAN. It took me a while to figure this out. Using the sudo cookbook is one way to work around this.

In other news, CentOS 7 has a package for cpanminus. You might want to look into that.

/tmp/local-lib/ is deleted and created during every chef run.

Recipe:

include_recipe "cpan::default"

cpan_client 'URI' do
    action 'install'
    version '0'
    install_type 'cpan_module'
    user 'root'
    group 'root'
end

Chef Log:

Recipe: cpan::default
  * directory[/tmp/local-lib/] action delete
    - delete existing directory /tmp/local-lib/

  * directory[/tmp/local-lib/] action create
    - create new directory /tmp/local-lib/
    - change mode from '' to '0777'

  * directory[/tmp/local-lib/install] action create
    - create new directory /tmp/local-lib/install
    - change mode from '' to '0777'

Recipe: iweb_powa::packages
  * cpan_client[URI] action install[2014-03-12T16:46:14+01:00] WARN: Cloning resource attributes for directory[/tmp/local-lib/] from prior resource (CHEF-3694)
[2014-03-12T16:46:14+01:00] WARN: Previous directory[/tmp/local-lib/]: /var/chef/cache/cookbooks/cpan/recipes/default.rb:6:in `from_file'
[2014-03-12T16:46:14+01:00] WARN: Current  directory[/tmp/local-lib/]: /var/chef/cache/cookbooks/cpan/providers/client.rb:220:in `block in class_from_file'
[2014-03-12T16:46:14+01:00] WARN: Cloning resource attributes for directory[/tmp/local-lib/install] from prior resource (CHEF-3694)
[2014-03-12T16:46:14+01:00] WARN: Previous directory[/tmp/local-lib/install]: /var/chef/cache/cookbooks/cpan/recipes/default.rb:11:in `from_file'
[2014-03-12T16:46:14+01:00] WARN: Current  directory[/tmp/local-lib/install]: /var/chef/cache/cookbooks/cpan/providers/client.rb:225:in `block in class_from_file'

Is there a way to only have the dirs deleted and recreated if the cpan module is not installed?

Cpan installation issue

Here my call :
include_recipe 'cpan::bootstrap'
cpan_client 'Digest::SHA1' do
action 'install'
install_type 'cpan_module'
user 'root'
group 'root'
end

Here some log

[2012-10-16T08:26:55+00:00] INFO: Processing bash[checking if module exists at CPAN] action run (/var/chef/cache/cookbooks/cpan/providers/client.rb line 387)
Reading '/root/.cpan/Metadata'
Database was generated on Tue, 16 Oct 2012 06:15:44 GMT
[2012-10-16T08:26:57+00:00] INFO: bash[checking if module exists at CPAN] ran successfully
[2012-10-16T08:26:57+00:00] INFO: Processing bash[installing cpan module] action run (/var/chef/cache/cookbooks/cpan/providers/client.rb line 419)
[2012-10-16T08:27:45+00:00] INFO: bash[installing cpan module] ran successfully
[2012-10-16T08:27:45+00:00] INFO: Processing ruby_block[install-log] action create (/var/chef/cache/cookbooks/cpan/providers/client.rb line 88)

Dist::Metadata install summary <<<
/usr/bin/make -- OK [ADAMK/Archive-Zip-1.30.tar.gz]
/usr/bin/make test -- OK [ADAMK/Archive-Zip-1.30.tar.gz]
/usr/bin/make install -- OK [ADAMK/Archive-Zip-1.30.tar.gz]
/usr/bin/make -- OK [DOY/Try-Tiny-0.11.tar.gz]
/usr/bin/make test -- OK [DOY/Try-Tiny-0.11.tar.gz]
/usr/bin/make install -- OK [DOY/Try-Tiny-0.11.tar.gz]
/usr/bin/make -- OK [RJBS/Test-Fatal-0.010.tar.gz]
/usr/bin/make test -- OK [RJBS/Test-Fatal-0.010.tar.gz]
/usr/bin/make install -- OK [RJBS/Test-Fatal-0.010.tar.gz]
/usr/bin/make -- OK [GBARR/CPAN-DistnameInfo-0.12.tar.gz]
/usr/bin/make test -- OK [GBARR/CPAN-DistnameInfo-0.12.tar.gz]
/usr/bin/make install -- OK [GBARR/CPAN-DistnameInfo-0.12.tar.gz]
/usr/bin/make -- OK [CHROMATIC/UNIVERSAL-isa-1.20120726.tar.gz]
/usr/bin/make test -- OK [CHROMATIC/UNIVERSAL-isa-1.20120726.tar.gz]
/usr/bin/make install -- OK [CHROMATIC/UNIVERSAL-isa-1.20120726.tar.gz]

Error executing action create on resource 'ruby_block[install-log]'

RuntimeError

ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions
[]

Cookbook Trace:

/var/chef/cache/cookbooks/cpan/providers/client.rb:100:in install_log' /var/chef/cache/cookbooks/cpan/providers/client.rb:92:inforeach'
/var/chef/cache/cookbooks/cpan/providers/client.rb:92:in `install_log'

Resource Declaration:

In /var/chef/cache/cookbooks/cpan/providers/client.rb

88: ruby_block 'install-log' do
89: block do
90: print ">>> #{my_installed_module} install summary <<<\n"
91: prev_line = ''
92: IO.foreach(install_log_file) do |l|
93: valid_string = ic.iconv(l + ' ')[0..-2]
94: print " #{valid_string.chomp} [#{prev_line}]\n" if /\s--\s(OK|NOT OK)/.match(valid_string)
95: if /Stopping: 'install' failed/.match(valid_string) or /ERRORS/WARNINGS FOUND IN PREREQUISITES/.match(valid_string)
96: if force_mode == true
97: Chef::Log.warn("error occured : #{valid_string}[#{prev_line}]")
98: Chef::Log.info("will continue because we are in force_mode = true mode")
99: else
100: raise "#{valid_string}[#{prev_line}]\n"
101: end
102: end
103: prev_line = valid_string.chomp.gsub(/^\s+/,"").gsub(/\s+$/,"")
104: end
105: end

Compiled Resource:

Declared in /var/chef/cache/cookbooks/cpan/providers/client.rb:88:in `install_log'

ruby_block("install-log") do
retries 0
updated true
cookbook_name "cpan"
block #Proc:0x00007fdaa6733ec0@/var/chef/cache/cookbooks/cpan/providers/client.rb:89
action "create"
retry_delay 2
end

[2012-10-16T08:27:45+00:00] ERROR: Running exception handlers
[2012-10-16T08:27:47+00:00] FATAL: Saving node information to /var/chef/cache/failed-run-data.json
[2012-10-16T08:27:47+00:00] ERROR: Exception handlers complete
[2012-10-16T08:27:47+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2012-10-16T08:27:47+00:00] FATAL: RuntimeError: ruby_block[install-log](/var/chef/cache/cookbooks/cpan/providers/client.rb line 88) had an error: RuntimeError: ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions
[]

root@vagrant:~# cpan

CPAN.pm requires configuration, but most of it can be done automatically.
If you answer 'no' below, you will enter an interactive dialog for each
configuration option instead.

Would you like to configure as much as possible automatically? [yes] ^C
root@vagrant:# su -
root@vagrant:
# cpan install SHA1
Reading '/root/.cpan/Metadata'
Database was generated on Tue, 16 Oct 2012 06:15:44 GMT
Warning: Cannot install SHA1, don't know what it is.
Try the command

i /SHA1/

to find objects with matching identifiers.

Consider breaking cookbooks into separate git projects

If the cookbooks lived in own projects it would give you ability to do proper releases and tag commits. I attempted to try and mirror just the span cookbook but realized trying to figure out when older versions of cpan were released is a pita.

Undefined method or attribute `cpan_client' on `node'(2)

Здравствуйте. Столнулся с такой же ситацией, как и в этом тикете - #23
metadata.rb

name 'sparrow'
version '0.1.0'
maintainer 'Spigell 7th'
maintainer_email '[email protected]'

depends 'cpan'

default.rb

include_recipe 'cpan::default'
include_recipe 'cpan::bootstrap'

cpan_client 'Sparrow' do
  action 'install'
  install_type 'cpan_module'
  user 'root'
  group 'root'
end

Не очень понимаю как заставить его работать. Трейс - https://gist.github.com/Spigell/f76c3eeca2523dbb51399de8f933f54f

Даже когда я пытаюсь прогнать cpan::bootstrap отдельно тоже такая же ошибка.
Версия:

[vagrant@testo ~]$ chef-client -v
Chef: 13.2.20

Использую chef-solo.

FYI: New Pinto Release

Hi Alexey,

A new version of Pinto has been released to the repository on Stratopan.com (and CPAN) too. If you have a convenient way to re-test all of your recipes, now would be a good time to do it.

Install and run as the "pinto" user

While working with @hesco on the puppet configuration, we decided that it is best to install Pinto and run the pintod server as the "pinto" user rather than root. Running anything as root creates potential security problems.

License

Hi!

The cpan cookbook looks to have a license "All rights reserved". Would you be willing to make this Apache-2.0 or any other OSI approved license https://opensource.org/licenses?

Undefined method or attribute `cpan_client' on `node'

Not sure if this is a version problem or missing a cookbook but chef cannot find the cpan_client. I only have cpan cookbook installed.

include_recipe 'cpan::default'
include_recipe 'cpan::bootstrap'

Thanks, John.

==> nagios_server: NoMethodError
==> nagios_server: -------------
==> nagios_server: Undefined method or attribute cpan_client' onnode'
==> nagios_server:
==> nagios_server:
==> nagios_server: Cookbook Trace:
==> nagios_server: ---------------
==> nagios_server: /tmp/vagrant-chef-2/chef-solo-1/cookbooks/cpan/recipes/bootstrap.rb:3:in from_file' ==> nagios_server: /tmp/vagrant-chef-2/chef-solo-2/cookbooks/monitoring/recipes/configure-server-hadoop-nagios-plugins.rb:11:infrom_file'
==> nagios_server:
==> nagios_server:
==> nagios_server: Relevant File Content:
==> nagios_server: ----------------------
==> nagios_server: /tmp/vagrant-chef-2/chef-solo-1/cookbooks/cpan/recipes/bootstrap.rb:
==> nagios_server:
==> nagios_server: 1: include_recipe 'cpan'
==> nagios_server: 2:
==> nagios_server: 3>> node.cpan_client.bootstrap.packages.each { |p| package p }
==> nagios_server: 4:
==> nagios_server: 5: execute 'curl -L http://cpanmin.us | perl - --sudo App::cpanminus' do
==> nagios_server: 6: only_if do
==> nagios_server: 7: exe_run = true
==> nagios_server: 8: unless node.cpan_client.bootstrap.keep_uptodate
==> nagios_server: 9: if system("which cpanm > /dev/null 2>&1")
==> nagios_server: 10: exe_run = false
==> nagios_server: 11: end
==> nagios_server: 12: end
==> nagios_server:
==> nagios_server:
==> nagios_server:
==> nagios_server: [2014-06-26T08:04:59+00:00] ERROR: Running exception handlers
==> nagios_server: [2014-06-26T08:04:59+00:00] ERROR: Exception handlers complete
==> nagios_server: [2014-06-26T08:04:59+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> nagios_server: [2014-06-26T08:04:59+00:00] FATAL: NoMethodError: Undefined method or attribute cpan_client' onnode'

issue on some hosts on cpan::bootstrap

curl -L http://cpanmin.us | perl - --sudo App::cpanminus
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
113 226 113 226 0 0 79 0 0:00:02 0:00:02 --:--:-- 79
Bareword found where operator expected at - line 3, near "400 Bad"
(Missing operator before Bad?)
Bareword found where operator expected at - line 6, near "

Your"
(Missing operator before Your?)
syntax error at - line 2, near "html>"
Execution of - aborted due to compilation errors.

adding option -k to curl fix ussie

curl -V
curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz

curl -vvvvv -L http://cpanmin.us

  • About to connect() to cpanmin.us port 80 (#0)
  • Trying 202.181.96.213... connected
  • Connected to cpanmin.us (202.181.96.213) port 80 (#0)

    GET / HTTP/1.1
    User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
    Host: cpanmin.us
    Accept: /

    < HTTP/1.1 302 Found
    < Server: nginx/1.2.7
    < Date: Wed, 07 May 2014 13:49:22 GMT
    < Content-Type: text/html; charset=iso-8859-1
    < Transfer-Encoding: chunked
    < Connection: keep-alive
    < Location: https://raw.github.com/miyagawa/cpanminus/master/cpanm
    <
  • Ignoring the response-body
  • Connection #0 to host cpanmin.us left intact
  • Issue another request to this URL: 'https://raw.github.com/miyagawa/cpanminus/master/cpanm'
  • About to connect() to raw.github.com port 443 (#1)
  • Trying 199.27.76.133... connected
  • Connected to raw.github.com (199.27.76.133) port 443 (#1)
  • Initializing NSS with certpath: sql:/etc/pki/nssdb
  • CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath: none
  • SSL connection using SSL_RSA_WITH_RC4_128_SHA
  • Server certificate:
  •   subject: CN=www.github.com,O="Fastly, Inc.",L=San Francisco,ST=California,C=US
    
  •   start date: Feb 25 00:00:00 2014 GMT
    
  •   expire date: Mar 02 12:00:00 2015 GMT
    
  •   common name: www.github.com
    
  •   issuer: CN=DigiCert High Assurance CA-3,OU=www.digicert.com,O=DigiCert Inc,C=US
    

    GET /miyagawa/cpanminus/master/cpanm HTTP/1.1
    User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
    Host: raw.github.com
    Accept: /

    < HTTP/1.1 301 Moved Permanently
    < Date: Wed, 07 May 2014 13:49:21 GMT
    < Server: Apache
    < Location: https://raw.githubusercontent.com/miyagawa/cpanminus/master/cpanm
    < Content-Length: 0
    < Accept-Ranges: bytes
    < Via: 1.1 varnish
    < Age: 0
    < X-Served-By: cache-jfk1031-JFK
    < X-Cache: MISS
    < X-Cache-Hits: 0
    < Vary: Accept-Encoding
    <
  • Connection #1 to host raw.github.com left intact
  • Issue another request to this URL: 'https://raw.githubusercontent.com/miyagawa/cpanminus/master/cpanm'
  • About to connect() to raw.githubusercontent.com port 443 (#2)
  • Trying 199.27.76.133... connected
  • Connected to raw.githubusercontent.com (199.27.76.133) port 443 (#2)
  • CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath: none
  • SSL connection using SSL_RSA_WITH_RC4_128_SHA
  • Server certificate:
  •   subject: CN=www.github.com,O="Fastly, Inc.",L=San Francisco,ST=California,C=US
    
  •   start date: Feb 25 00:00:00 2014 GMT
    
  •   expire date: Mar 02 12:00:00 2015 GMT
    
  •   common name: www.github.com
    
  •   issuer: CN=DigiCert High Assurance CA-3,OU=www.digicert.com,O=DigiCert Inc,C=US
    

    GET /miyagawa/cpanminus/master/cpanm HTTP/1.1
    User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
    Host: raw.githubusercontent.com
    Accept: /

    < HTTP/1.1 400 Bad Request
    < Date: Wed, 07 May 2014 13:49:21 GMT
    < Server: Apache
    < Content-Length: 226
    < Connection: close
    < Content-Type: text/html; charset=iso-8859-1
    < <title>400 Bad Request</title>

    Bad Request

    Your browser sent a request that this server could not understand.

  • Closing connection #2
  • Closing connection #0
  • Closing connection #1

undefined method `cpan_client' after update to Chef 13

Hi,

I'm getting the error "undefined method `cpan_client' for #Chef::Node::VividMash:0x00000002bf3a68" in cpan/attributes/default.rb from a kitchen run. This only happens with Chef 13. It works when I switch back to Chef 12 - which of course is not a long-term workaround.

My metadata.rb states a dependency on instantclient:
depends 'oracle-instantclient', '~> 1.1'
which in turn states:
depends 'cpan'

The full error message is:
Installing Cookbook Gems:
Compiling Cookbooks...

  =======================================================================
   Recipe Compile Error in /tmp/kitchen/cache/cookbooks/cpan/attributes/default.rb
 =======================================================================
   
   NoMethodError
   -------------
   undefined method `cpan_client' for #<Chef::Node::VividMash:0x00000003e686f8>
   
   Cookbook Trace:
   ---------------
     /tmp/kitchen/cache/cookbooks/cpan/attributes/default.rb:1:in `from_file'
   
   Relevant File Content:
   ----------------------
   /tmp/kitchen/cache/cookbooks/cpan/attributes/default.rb:
   
     1>> default.cpan_client.bootstrap.packages = ['curl']
     2:  
     3:  case platform
     4:  when 'centos'
     5:      default.cpan_client.bootstrap.packages << 'perl-devel'
     6:      default.cpan_client.bootstrap.packages << 'perl-CPAN'
     7:  end
     8:  
     9:  default.cpan_client.bootstrap.cpan_packages = ['Time::HiRes', 'CPAN::Meta', 'CPAN', 'local::lib', 'App::pmuninstall']
    10:  
   
   System Info:
   ------------
   chef_version=13.0.118
   platform=centos
   platform_version=6.8
   ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
   program_name=chef-client worker: ppid=86;start=12:52:54;
   executable=/opt/chef/bin/chef-client

Any idea why this happens with the new Chef version?

Thanks and regards,
Andreas

CPAN cookbook iconv

It seem we need to have the iconv gem

elevant File Content:

/var/chef/cache/cookbooks/cpan/providers/client.rb:

1>> require 'iconv'
2:
3: def load_current_resource
4:
5: @installer = Chef::Resource::CpanClient.new(new_resource.name)
6: @installer.name(new_resource.name)
7: @installer.module_name(new_resource.module_name)
8: @installer.install_base(new_resource.install_base)
9: @installer.dry_run(new_resource.dry_run)
10: @installer.reload_cpan_index(new_resource.reload_cpan_index)

CPAN install error on ubuntu

include_recipe "cpan::bootstrap"
and chef run on AWS ubuntu instance storage AMI:
ubuntu-precise-daily-amd64-server-20140421 ami-005d2830

has the error as:

[2014-04-28T18:42:58+00:00] INFO: Processing package[curl] action install (cpan::bootstrap line 3)
[2014-04-28T18:42:58+00:00] INFO: Processing execute[curl -L http://cpanmin.us | perl - --sudo App::cpanminus] action run (cpan::bootstrap line 5)
[2014-04-28T18:42:59+00:00] INFO: execute[curl -L http://cpanmin.us | perl - --sudo App::cpanminus] ran successfully
[2014-04-28T18:42:59+00:00] INFO: Processing execute[cpanm Time::HiRes] action run (cpan::bootstrap line 8)
[2014-04-28T18:43:00+00:00] INFO: execute[cpanm Time::HiRes] ran successfully
[2014-04-28T18:43:00+00:00] INFO: Processing execute[cpanm CPAN] action run (cpan::bootstrap line 8)
[2014-04-28T18:43:03+00:00] INFO: Running queued delayed notifications before re-raising exception
[2014-04-28T18:43:03+00:00] ERROR: Running exception handlers
[2014-04-28T18:43:03+00:00] ERROR: Exception handlers complete
[2014-04-28T18:43:03+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2014-04-28T18:43:03+00:00] ERROR: execute[cpanm CPAN] (cpan::bootstrap line 8) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of cpanm CPAN ----
STDOUT: --> Working on CPAN
Fetching http://www.cpan.org/authors/id/A/AN/ANDK/CPAN-2.05.tar.gz ... OK
Configuring CPAN-2.05 ... N/A
STDERR: ! Configure failed for CPAN-2.05. See /.cpanm/work/1398710580.4324/build.log for details.
---- End output of cpanm CPAN ----
Ran cpanm CPAN returned 1
^[[0m
================================================================================^[[0m
^[[31mError executing action `run` on resource 'execute[cpanm CPAN]'^[[0m
================================================================================^[[0m

^[[0m
Mixlib::ShellOut::ShellCommandFailed^[[0m
------------------------------------^[[0m
Expected process to exit with [0], but received '1'
---- Begin output of cpanm CPAN ----
STDOUT: --> Working on CPAN
Fetching http://www.cpan.org/authors/id/A/AN/ANDK/CPAN-2.05.tar.gz ... OK
Configuring CPAN-2.05 ... N/A
STDERR: ! Configure failed for CPAN-2.05. See /.cpanm/work/1398710580.4324/build.log for details.
---- End output of cpanm CPAN ----
Ran cpanm CPAN returned 1^[[0m

^[[0m
Resource Declaration:^[[0m
---------------------^[[0m
# In /var/chef/cache/cookbooks/cpan/recipes/bootstrap.rb

  8:     execute "cpanm #{m}" do
  9:         user 'root'
 10:         group 'root'
 11:   end
 12: end
^[[0m

^[[0m
Compiled Resource:^[[0m
------------------^[[0m
# Declared in /var/chef/cache/cookbooks/cpan/recipes/bootstrap.rb:8:in `block in from_file'

execute("cpanm CPAN") do
  action "run"
  retries 0
  retry_delay 2
  command "cpanm CPAN"
  backup 5
  group "root"
  returns 0
  user "root"
  cookbook_name "cpan"
  recipe_name "bootstrap"
end
^[[0m

^[[0m

and the cpanm error log:

Unpacking CPAN-2.05.tar.gz
Entering CPAN-2.05
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.57_05)
Configuring CPAN-2.05
Running Makefile.PL
Can't locate CPAN/Meta/Requirements.pm in @INC (@INC contains: /.cpanm/work/1398710580.4324/CPAN-2.05/lib /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl /.cpanm/work/1398710580.4324/CPAN-2.05) at /.cpanm/work/1398710580.4324/CPAN-2.05/lib/CPAN/Distribution.pm line 7.
BEGIN failed--compilation aborted at /.cpanm/work/1398710580.4324/CPAN-2.05/lib/CPAN/Distribution.pm line 7.
Compilation failed in require at lib/CPAN.pm line 25.
BEGIN failed--compilation aborted at lib/CPAN.pm line 25.
Compilation failed in require at Makefile.PL line 34.

The error can be fixed by change

default.cpan_client.bootstrap.cpan_packages = ['Time::HiRes', 'CPAN', 'local::lib', 'App::pmuninstall']

to

default.cpan_client.bootstrap.cpan_packages = ['Time::HiRes', 'CPAN::Meta', 'CPAN', 'local::lib', 'App::pmuninstall']

Use the pinto installer instead of running cpanm directly

Rather than directly using cpanm to install Pinto, I suggest calling the install script like this:

curl -L http://getpinto.stratopan.com | bash

That will insulate you from changes in where I host the repository that supplies the modules for Pinto. However, this commits you to installing Pinto as a stand-alone application (rather than dumping it into PERL5LIB). For your purposes, I think that is probably the right thing to do.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.