Chef-solo FATAL: NoMethodError: undefined method `size' for nil:NilClass when run with --no-fork option - chef-solo

When running chef-solo with --no-fork option it gives the error
FATAL: NoMethodError: undefined method `size' for nil:NilClass
Does any one know the reason for it . It works fine when --fork option.

Related

Yocto minimal image failed

I am trying to build "core-image-minimal" in centos 7.
How to fix this error.
bitbake core-image-minimal
fatal: repository '/my_data/yocto/poky/build/downloads/git2/git.yoctoproject.org.linux-yocto.git/' does not exist
ERROR: linux-yocto-4.18.21+gitAUTOINC+8f4a98c938_9eddc793f9-r0 do_unpack: Function failed: base_do_unpack
ERROR: Logfile of failure stored in: /my_data/yocto/poky/build/tmp/work/qemux86-poky-linux/linux-yocto/4.18.21+gitAUTOINC+8f4a98c938_9eddc793f9-r0/temp/log.do_unpack.22789
ERROR: Task (/my_data/yocto/poky/meta/recipes-kernel/linux/linux-yocto_4.18.bb:do_unpack) failed with exit code '1'
Removing the tmp/ dir and building from scratch again works for me.

at command throws 'cannot set egid: Operation not permitted error'

I'm trying to execute a command using the following command:
/usr/local/bin/php xxx.php | at now + 10 minutes
However, terminal throws this error:
cannot set egid: Operation not permitted error
I tried adding the user to /etc/at.allow but that doesn't help. I also removed /etc/at.deny, but that also didn't help. Any ideas what is up? How can I give permission to the user to utilize the at command?
The permissions on /usr/bin/at are incorrect, it needs to be setuid to root:
sudo chmod u+s /usr/bin/at

Sailsjs grunt .svn error during lifting

I have imported my project in svn when I did a checkout and ran the app I got this error I am using sailsjs-0.10.5. I think it is to do with the grunt I am not able to find any solution it works fine in mac not in linux I set the permissin to 0777 even though it is not working here is the error.
verbose: Grunt :: Loading "Gruntfile.js" tasks...
verbose: Grunt :: ERROR
verbose: Grunt :: >> TypeError: Property '.svn' of object # is not a function
verbose: Grunt :: Warning: Task "default" not found.
error: ** Grunt :: An error occurred. **
error:
Aborted due to warnings.
Loading "Gruntfile.js" tasks...ERROR
TypeError: Property '.svn' of object # is not a function
Warning: Task "default" not found.
error: Looks like a Grunt error occurred--
error: Please fix it, then restart Sails to continue running tasks (e.g. watching for changes in assets)
error: Or if you're stuck, check out the troubleshooting tips below.
error: Troubleshooting tips:
error:
error: *-> Are "grunt" and related grunt task modules installed locally? Run npm install if you're not sure.
error:
error: *-> You might have a malformed LESS, SASS, CoffeeScript file, etc.
error:
error: *-> Or maybe you don't have permissions to access the .tmp directory?
error: e.g., /var/hosts/chating_room/.tmp ?
error:
error: If you think this might be the case, try running:
error: sudo chown -R YOUR_COMPUTER_USER_NAME /var/hosts/chating_room/.tmp
Make changes to Gruntfile.js, find loadTasks function, add excludeDirs : /^\.(git|svn)$/:
Original:
function loadTasks(relPath) {
return includeAll({
dirname: require('path').resolve(__dirname, relPath),
filter: /(.+)\.js$/
}) || {};
}
After:
function loadTasks(relPath) {
return includeAll({
dirname: require('path').resolve(__dirname, relPath),
filter: /(.+)\.js$/,
excludeDirs : /^\.(git|svn)$/
}) || {};
}
I have a same problem.
FIXED by
Simply deleting .svn folder from
1) task/.svn,
2) config/.svn &
3) register/.svn

Compiling Net::SSL for Strawberry Perl: “openssl/ssl.h: No such file or directory”

When I try to install Net::SSL I get the following output. I don't understad it at all. Can anyone point me in the right direction, without getting to techy?
C:\Documents and Settings\Administrator>cpan
CPAN: File::HomeDir loaded ok (v0.69)
cpan shell -- CPAN exploration and modules installation (v1.9205)
ReadLine support enabled
cpan> install Net::SSL
Database was generated on Tue, 14 Aug 2012 14:54:56 GMT
Running install for module 'Net::SSL'
Running make for N/NA/NANIS/Crypt-SSLeay-0.64.tar.gz
Checksum for C:\strawberry\cpan\sources\authors\id\N\NA\NANIS\Crypt-SSLeay-0.64.
tar.gz ok
Scanning cache C:\strawberry\cpan\build for sizes
............................................................................DONE
CPAN.pm: Going to build N/NA/NANIS/Crypt-SSLeay-0.64.tar.gz
The test suite can attempt to connect to public servers to ensure that the
code is working properly. If you are behind a strict firewall or have no
network connectivity, these tests may fail (through no fault of the code).
Do you want to run the live tests (y/N)? [N]
WARNING: BUILD_REQUIRES is not a known parameter.
Checking if your kit is complete...
Looks good
Warning: prerequisite LWP::Protocol::https 6.02 not found.
'BUILD_REQUIRES' is not a known MakeMaker parameter name.
Writing Makefile for Crypt::SSLeay
cp lib/Crypt/SSLeay/X509.pm blib\lib\Crypt\SSLeay\X509.pm
cp lib/Net/SSL.pm blib\lib\Net\SSL.pm
cp SSLeay.pm blib\lib\Crypt\SSLeay.pm
cp lib/Crypt/SSLeay/Conn.pm blib\lib\Crypt\SSLeay\Conn.pm
cp lib/Crypt/SSLeay/CTX.pm blib\lib\Crypt\SSLeay\CTX.pm
cp lib/Crypt/SSLeay/MainContext.pm blib\lib\Crypt\SSLeay\MainContext.pm
cp lib/Crypt/SSLeay/Err.pm blib\lib\Crypt\SSLeay\Err.pm
C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp -typemap
C:\strawberry\perl\lib\ExtUtils\typemap -typemap typemap SSLeay.xs > SSLeay.xs
c && C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e mv SSLeay.xsc SSLeay
.c
gcc -c -IC:\strawberry\c\include -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_
IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX
-s -O2 -DVERSION=\"0.64\" -DXS_VERSION=\"0.64\" "-IC:\strawberry\perl\lib
\CORE" SSLeay.c
SSLeay.xs:35:25: openssl/ssl.h: No such file or directory
SSLeay.xs:36:28: openssl/crypto.h: No such file or directory
SSLeay.xs:37:25: openssl/err.h: No such file or directory
SSLeay.xs:38:26: openssl/rand.h: No such file or directory
SSLeay.xs:39:28: openssl/pkcs12.h: No such file or directory
SSLeay.xs:55: error: syntax error before '*' token
SSLeay.xs: In function `InfoCallback':
SSLeay.xs:60: error: `where' undeclared (first use in this function)
SSLeay.xs:60: error: (Each undeclared identifier is reported only once
SSLeay.xs:60: error: for each function it appears in.)
SSLeay.xs:60: error: `SSL_ST_MASK' undeclared (first use in this function)
SSLeay.xs:62: error: `SSL_ST_CONNECT' undeclared (first use in this function)
SSLeay.xs:64: error: `SSL_ST_ACCEPT' undeclared (first use in this function)
SSLeay.xs:69: error: `SSL_CB_LOOP' undeclared (first use in this function)
SSLeay.xs:70: error: `s' undeclared (first use in this function)
SSLeay.xs:72: error: `SSL_CB_ALERT' undeclared (first use in this function)
SSLeay.xs:73: error: `SSL_CB_READ' undeclared (first use in this function)
SSLeay.xs:75: error: `ret' undeclared (first use in this function)
SSLeay.xs:78: error: `SSL_CB_EXIT' undeclared (first use in this function)
SSLeay.c: In function `XS_Crypt__SSLeay__CTX_new':
SSLeay.c:146: error: `SSL_CTX' undeclared (first use in this function)
SSLeay.c: In function `XS_Crypt__SSLeay__CTX_use_pkcs12_file':
SSLeay.c:334: error: `SSL_CTX' undeclared (first use in this function)
SSLeay.c:334: error: `ctx' undeclared (first use in this function)
SSLeay.xs:188: error: `EVP_PKEY' undeclared (first use in this function)
SSLeay.xs:188: error: `pkey' undeclared (first use in this function)
SSLeay.c:421: error: `ctx' undeclared (first use in this function)
SSLeay.c:646: error: `ssl' undeclared (first use in this function)
SSLeay.c:658: error: syntax error before ')' token
LOTS OF LINES SIMILAR TO ABOVE
SSLeay.xs:505: error: invalid type argument of `->'
dmake.EXE: Error code 129, while making 'SSLeay.o'
NANIS/Crypt-SSLeay-0.64.tar.gz
C:\strawberry\c\bin\dmake.EXE -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
NANIS/Crypt-SSLeay-0.64.tar.gz : make NO
I had the same problem and, although I had the openSSL package installed, the development headers where not. I had to install the package libssl-dev. I used the Ubuntu Software Center to download and install the package. Alternately, you could use sudo apt-get install libssl-dev from the terminal command line.
That fixed my problem but is no real help to you working with windows. openSSL has a link to a binary for windows at: OpenSSL for Windows
The following lines suggest that you probably have not installed the OpenSSL library/headers or it is in a location not known to perl. Install it with the package manager of your operating system, or compile and install it.
>SSLeay.xs:35:25: openssl/ssl.h: No such file or directory
>SSLeay.xs:36:28: openssl/crypto.h: No such file or directory
>SSLeay.xs:37:25: openssl/err.h: No such file or directory
>SSLeay.xs:38:26: openssl/rand.h: No such file or directory
>SSLeay.xs:39:28: openssl/pkcs12.h: No such file or directory
After installing the library/headers, cpan should be able to make and install Net::SSL.
Generally CPAN takes care of this for you by installing all the dependent modules.
The problem you are facing is with this warning
WARNING: BUILD_REQUIRES is not a known parameter.
Now since CPAN is unable to read this parameter it is unable to get all the dependent modules for you and hence is unable to install.
The Problem may be with the perl-ExtUtils-MakeMaker module with comes with cpan utility.
You may want to install the latest version of cpan and try. Or as previously mentioned You may want to install all the modules after downloading them individually and then installing them manually.
First, I have got the problem like this:
mod_qos.c:83:26: error: openssl/rand.h: No such file or directory
mod_qos.c:84:25: error: openssl/evp.h: No such file or directory
Then I used the following:
apxs -I/usr/local/openssl/include/openssl -i -c mod_qos.c -lcrypto -lpcre
and it succeeded! Why?

Force ruby to hide backtrace on exception

I do some usual tasks with Rakefile, such as compilation, linking, etc.
When compilation fails ruby shows full backtrace in which task error happen, but it's really useless for me, even more: this backtrace hides compilation errors.
$ rake
mkdir -p build
llvm-as source/repl.ll -o build/repl.bc
llvm-as: source/repl.ll:6:22: error: expected value token
call i32 #fputc(i8 'x', i32 0)
^
rake aborted!
Command failed with status (1): [llvm-as source/repl.ll -o build/repl.bc...]
/usr/local/lib/ruby/1.9.1/rake.rb:993:in `block in sh'
/usr/local/lib/ruby/1.9.1/rake.rb:1008:in `call'
/usr/local/lib/ruby/1.9.1/rake.rb:1008:in `sh'
/usr/local/lib/ruby/1.9.1/rake.rb:1092:in `sh'
...
How to hide all after "rake aborted!" ?
It seems that you are using the "sh" command in the rake task to start the compiler. In that case you should catch a RuntimeError, in order to get this error. Something like this:
task "foo" do
begin
sh "bar"
rescue RuntimeError => e
puts e.message
exit(1)
end
end