puppet agent error ubuntu 16.04

asked 2017-03-29 19:09:52 -0500

fredt gravatar image

I installed puppet-agent 1.9.3-1xenial on Ubuntu 16.04, however I got following error when trying to run puppet command:

===========

/opt/puppetlabs/puppet/lib/ruby/2.1.0/rubygems/ext/builder.rb:89:in `run': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError)

/opt/puppetlabs/puppet/bin/ruby extconf.rb

extconf.rb:4:in <main>': Use RbConfig instead of obsolete and deprecated Config. extconf.rb:4:in<main>': Use RbConfig instead of obsolete and deprecated Config. extconf.rb:5:in `<main>': Use RbConfig instead of obsolete and deprecated Config.

These line gets substituted with the actual Config::CONFIG items location by extconf.rb

PREFIX = /opt/puppetlabs/puppet BINDIR = /opt/puppetlabs/puppet/bin INSTALLDIR = $(PREFIX)/lib/ruby/shared/rubygems/defaults INSTALLDIR9000 = $(PREFIX)/lib/ruby/stdlib/rubygems/defaults OLDINSTALLDIR = $(PREFIX)/lib/ruby/site_ruby/1.8/rubygems/defaults

ifeq (true,$(shell test -x $(BINDIR)/jruby && echo true)) RAKE=$(BINDIR)/jruby -S rake else RAKE=rake endif

build: .build-post

.build-pre:

.build-post: .build-impl build-exe

build-exe: @if [ "$(findstring mingw, $(CONF))" ]; then \ ${MAKE} -f ${SUB_CONFMK} SUBPROJECTS=${SUBPROJECTS} jruby.exe jrubyw.exe; \ if [ -d ../jruby ]; then cp jruby.exe jrubyw.exe jruby.dll ../jruby/bin/; fi; \ if [ -d D:/work/jruby-dev/jruby ]; then cp jruby.exe jrubyw.exe jruby.dll D:/work/jruby-dev/jruby/bin/; fi; \ fi

jruby.res: resources/jruby.rc windres $^ -O coff -o $@

jruby.exe: jrubyexe.cpp nbexecloader.h utilsfuncs.cpp utilsfuncswin.cpp jruby.res g++ $(CXXFLAGS) $^ -s -o $@ $(LDLIBSOPTIONS) -static

jrubyw.exe: jrubyexe.cpp nbexecloader.h utilsfuncs.cpp utilsfuncswin.cpp jruby.res g++ $(CXXFLAGS) -DJRUBYW -mwindows $^ -s -o $@ $(LDLIBSOPTIONS) -static

install: @if [ ! -f ./jruby ]; then echo "Please run 'make' first."; exit 1; fi @if [ x$(BINDIR) = xnotspecified/bin ]; then echo "Please define where to install by passing PREFIX=<jruby-home>."; exit 1; fi @if [ ! -w $(BINDIR) ]; then echo "'$(BINDIR)' does not exist or cannot write to '$(BINDIR)'."; exit 1; fi @if [ -f $(BINDIR)/jruby -a ! -w $(BINDIR)/jruby ]; then echo "Cannot write to '$(BINDIR)/jruby'."; exit 1; fi cp ./jruby $(BINDIR)/jruby @if [ x$(PREFIX) = xnotspecified ]; then echo "Please define where to install by passing PREFIX=<jruby-home>."; exit 1; fi @if [ ! -w $(INSTALLDIR) ]; then \ if [ ! -w $(OLDINSTALLDIR) ]; then \ if [ ! -w $(INSTALLDIR9000) ]; then \ echo "Neither '$(INSTALLDIR9000)' nor '$(INSTALLDIR)' nor '$(OLDINSTALLDIR)' exist and are writable"; exit 1; \ else \
echo "cp ./lib/rubygems/defaults/jrubynative.rb $(INSTALLDIR9000)"; \ cp ./lib/rubygems/defaults/jrubynative.rb $(INSTALLDIR9000); \ fi; \ else \
echo "cp ./lib/rubygems/defaults/jrubynative.rb $(OLDINSTALLDIR)"; \ cp ./lib/rubygems/defaults/jrubynative.rb $(OLDINSTALLDIR); \ fi; \ else \
echo "cp ./lib/rubygems/defaults/jrubynative.rb $(INSTALLDIR)"; \ cp ./lib/rubygems/defaults/jrubynative.rb $(INSTALLDIR); \ fi;

test: $(RAKE)

Universal binary on OSX

FATARCHES=i386 ppc x8664

fat: $(FATARCHES) lipo -create $(foreach arch,$(FATARCHES),build/unix/Darwin-$(arch)/jruby-launcher) -output jruby $(RAKE)

$(FATARCHES): $(MAKE) -f $(SUBCONFMK) CND_PLATFORM=Darwin-$@ CFLAGS="-arch $@" build/unix/Darwin-$@/jruby-launcher

clean: .clean-post

.clean-pre: -rm -rf build/*

.clean-post: .clean-impl rm -f *.exe *.res

clobber: .clobber-post

.clobber-pre:

.clobber-post: .clobber-impl

all: .all-post

.all-pre:

.all-post: .all-impl

help: .help-post

.help-pre:

.help-post: .help-impl ... (more)

edit retag flag offensive close merge delete