Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added missing packages. #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

rmestrum
Copy link

On a minimum install CentOS 7 system the gcc and ruby-devel packages are not installed.

When installing the puppet-forge-server gem the installation fails with the following errors:

Initially the error is:

[root@localhost ~]# cd /etc/puppet/manifests/
[root@localhost manifests]# puppet apply --parser future site.pp
Notice: Compiled catalog for localhost in environment production in 1.15 seconds
Error: Execution of '/usr/bin/gem install --no-rdoc --no-ri puppet-forge-server' returned 1: Building native extensions.  This could take a while...
ERROR:  Error installing puppet-forge-server:
	ERROR: Failed to build gem native extension.

    /usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h


Gem files will remain installed in /usr/local/share/gems/gems/json-1.8.6 for inspection.
Results logged to /usr/local/share/gems/gems/json-1.8.6/ext/json/ext/generator/gem_make.out
Error: /Stage[main]/Forge_server::Package/Package[puppet-forge-server]/ensure: change from absent to present failed: Execution of '/usr/bin/gem install --no-rdoc --no-ri puppet-forge-server' returned 1: Building native extensions.  This could take a while...
ERROR:  Error installing puppet-forge-server:
	ERROR: Failed to build gem native extension.

    /usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h


Gem files will remain installed in /usr/local/share/gems/gems/json-1.8.6 for inspection.
Results logged to /usr/local/share/gems/gems/json-1.8.6/ext/json/ext/generator/gem_make.out

This error can be solved by installing the ruby-devel package.

Then the installation fails with

[root@localhost manifests]# puppet apply --parser future site.pp
Notice: Compiled catalog for localhost in environment production in 1.13 seconds
Error: Execution of '/usr/bin/gem install --no-rdoc --no-ri puppet-forge-server' returned 1: Building native extensions.  This could take a while...
ERROR:  Error installing puppet-forge-server:
	ERROR: Failed to build gem native extension.

    /usr/bin/ruby extconf.rb
creating Makefile

make "DESTDIR="
gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -DJSON_GENERATOR    -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic -fPIC -m64 -o generator.o -c generator.c
make: gcc: Command not found
make: *** [generator.o] Error 127


Gem files will remain installed in /usr/local/share/gems/gems/json-1.8.6 for inspection.
Results logged to /usr/local/share/gems/gems/json-1.8.6/ext/json/ext/generator/gem_make.out
Error: /Stage[main]/Forge_server::Package/Package[puppet-forge-server]/ensure: change from absent to present failed: Execution of '/usr/bin/gem install --no-rdoc --no-ri puppet-forge-server' returned 1: Building native extensions.  This could take a while...
ERROR:  Error installing puppet-forge-server:
	ERROR: Failed to build gem native extension.

    /usr/bin/ruby extconf.rb
creating Makefile

make "DESTDIR="
gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -DJSON_GENERATOR    -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic -fPIC -m64 -o generator.o -c generator.c
make: gcc: Command not found
make: *** [generator.o] Error 127

After installing the missing packages the installation finshes successfully

[root@localhost manifests]# puppet apply --parser future site.pp
Notice: Compiled catalog for localhost in environment production in 1.12 seconds
Notice: /Stage[main]/Forge_server::Package/Package[puppet-forge-server]/ensure: created
Notice: /Stage[main]/Forge_server::Config/File[/etc/default/puppet-forge-server]/ensure: created
Notice: /Stage[main]/Forge_server::Config/File[/usr/lib/tmpfiles.d/puppet-forge-server.conf]/ensure: created
Notice: /Stage[main]/Forge_server::Config/File[/etc/systemd/system/puppet-forge-server.service]/ensure: created
Notice: /Stage[main]/Forge_server::Config/Exec[forge_systemctl-daemon-reload]: Triggered 'refresh' from 1 events
Notice: /Stage[main]/Forge_server::Files/Forge_server::Mkdir[/mnt/forge/cache]/Exec[forge_server_mkdir_p_/mnt/forge/cache]/returns: executed successfully
Notice: /Stage[main]/Forge_server::Files/Forge_server::Mkdir[/mnt/forge/modules]/Exec[forge_server_mkdir_p_/mnt/forge/modules]/returns: executed successfully
Notice: /Stage[main]/Forge_server::Files/File[/mnt/forge/modules]/owner: owner changed 'root' to 'forge'
Notice: /Stage[main]/Forge_server::Files/File[/mnt/forge/modules]/group: group changed 'root' to 'forge'
Notice: /Stage[main]/Forge_server::Files/File[/mnt/forge/cache]/owner: owner changed 'root' to 'forge'
Notice: /Stage[main]/Forge_server::Files/File[/mnt/forge/cache]/group: group changed 'root' to 'forge'
Notice: /Stage[main]/Forge_server::Files/Forge_server::Mkdir[/var/log/forge]/Exec[forge_server_mkdir_p_/var/log/forge]/returns: executed successfully
Notice: /Stage[main]/Forge_server::Files/File[/var/log/forge]/owner: owner changed 'root' to 'forge'
Notice: /Stage[main]/Forge_server::Files/File[/var/log/forge]/group: group changed 'root' to 'forge'
Notice: /Stage[main]/Forge_server::Files/File[/var/log/forge]/mode: mode changed '0755' to '0700'
Notice: /File[/var/log/forge]/seluser: seluser changed 'unconfined_u' to 'system_u'
Notice: /Stage[main]/Forge_server::Files/Forge_server::Mkdir[/var/run/puppet-forge-server]/Exec[forge_server_mkdir_p_/var/run/puppet-forge-server]/returns: executed successfully
Notice: /Stage[main]/Forge_server::Files/File[/var/run/puppet-forge-server]/owner: owner changed 'root' to 'forge'
Notice: /Stage[main]/Forge_server::Files/File[/var/run/puppet-forge-server]/group: group changed 'root' to 'forge'
Notice: /File[/var/run/puppet-forge-server]/seluser: seluser changed 'unconfined_u' to 'system_u'
Notice: /Stage[main]/Forge_server::Service/Service[puppet-forge-server]/ensure: ensure changed 'stopped' to 'running'
Notice: Finished catalog run in 9.56 seconds
[root@localhost manifests]#

On a minimum install CentOS 7 system the gcc and ruby-devel packages are not installed.

When installing the puppet-forge-server gem the installation fails with the following errors:

Initially the error is:

```
[root@localhost ~]# cd /etc/puppet/manifests/
[root@localhost manifests]# puppet apply --parser future site.pp
Notice: Compiled catalog for localhost in environment production in 1.15 seconds
Error: Execution of '/usr/bin/gem install --no-rdoc --no-ri puppet-forge-server' returned 1: Building native extensions.  This could take a while...
ERROR:  Error installing puppet-forge-server:
	ERROR: Failed to build gem native extension.

    /usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h


Gem files will remain installed in /usr/local/share/gems/gems/json-1.8.6 for inspection.
Results logged to /usr/local/share/gems/gems/json-1.8.6/ext/json/ext/generator/gem_make.out
Error: /Stage[main]/Forge_server::Package/Package[puppet-forge-server]/ensure: change from absent to present failed: Execution of '/usr/bin/gem install --no-rdoc --no-ri puppet-forge-server' returned 1: Building native extensions.  This could take a while...
ERROR:  Error installing puppet-forge-server:
	ERROR: Failed to build gem native extension.

    /usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h


Gem files will remain installed in /usr/local/share/gems/gems/json-1.8.6 for inspection.
Results logged to /usr/local/share/gems/gems/json-1.8.6/ext/json/ext/generator/gem_make.out
```


This error can be solved by installing the ruby-devel package.

Then the installation fails with

```
[root@localhost manifests]# puppet apply --parser future site.pp
Notice: Compiled catalog for localhost in environment production in 1.13 seconds
Error: Execution of '/usr/bin/gem install --no-rdoc --no-ri puppet-forge-server' returned 1: Building native extensions.  This could take a while...
ERROR:  Error installing puppet-forge-server:
	ERROR: Failed to build gem native extension.

    /usr/bin/ruby extconf.rb
creating Makefile

make "DESTDIR="
gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -DJSON_GENERATOR    -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic -fPIC -m64 -o generator.o -c generator.c
make: gcc: Command not found
make: *** [generator.o] Error 127


Gem files will remain installed in /usr/local/share/gems/gems/json-1.8.6 for inspection.
Results logged to /usr/local/share/gems/gems/json-1.8.6/ext/json/ext/generator/gem_make.out
Error: /Stage[main]/Forge_server::Package/Package[puppet-forge-server]/ensure: change from absent to present failed: Execution of '/usr/bin/gem install --no-rdoc --no-ri puppet-forge-server' returned 1: Building native extensions.  This could take a while...
ERROR:  Error installing puppet-forge-server:
	ERROR: Failed to build gem native extension.

    /usr/bin/ruby extconf.rb
creating Makefile

make "DESTDIR="
gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -DJSON_GENERATOR    -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic -fPIC -m64 -o generator.o -c generator.c
make: gcc: Command not found
make: *** [generator.o] Error 127
```

After installing the missing packages the installation finshes successfully

```
[root@localhost manifests]# puppet apply --parser future site.pp
Notice: Compiled catalog for localhost in environment production in 1.12 seconds
Notice: /Stage[main]/Forge_server::Package/Package[puppet-forge-server]/ensure: created
Notice: /Stage[main]/Forge_server::Config/File[/etc/default/puppet-forge-server]/ensure: created
Notice: /Stage[main]/Forge_server::Config/File[/usr/lib/tmpfiles.d/puppet-forge-server.conf]/ensure: created
Notice: /Stage[main]/Forge_server::Config/File[/etc/systemd/system/puppet-forge-server.service]/ensure: created
Notice: /Stage[main]/Forge_server::Config/Exec[forge_systemctl-daemon-reload]: Triggered 'refresh' from 1 events
Notice: /Stage[main]/Forge_server::Files/Forge_server::Mkdir[/mnt/forge/cache]/Exec[forge_server_mkdir_p_/mnt/forge/cache]/returns: executed successfully
Notice: /Stage[main]/Forge_server::Files/Forge_server::Mkdir[/mnt/forge/modules]/Exec[forge_server_mkdir_p_/mnt/forge/modules]/returns: executed successfully
Notice: /Stage[main]/Forge_server::Files/File[/mnt/forge/modules]/owner: owner changed 'root' to 'forge'
Notice: /Stage[main]/Forge_server::Files/File[/mnt/forge/modules]/group: group changed 'root' to 'forge'
Notice: /Stage[main]/Forge_server::Files/File[/mnt/forge/cache]/owner: owner changed 'root' to 'forge'
Notice: /Stage[main]/Forge_server::Files/File[/mnt/forge/cache]/group: group changed 'root' to 'forge'
Notice: /Stage[main]/Forge_server::Files/Forge_server::Mkdir[/var/log/forge]/Exec[forge_server_mkdir_p_/var/log/forge]/returns: executed successfully
Notice: /Stage[main]/Forge_server::Files/File[/var/log/forge]/owner: owner changed 'root' to 'forge'
Notice: /Stage[main]/Forge_server::Files/File[/var/log/forge]/group: group changed 'root' to 'forge'
Notice: /Stage[main]/Forge_server::Files/File[/var/log/forge]/mode: mode changed '0755' to '0700'
Notice: /File[/var/log/forge]/seluser: seluser changed 'unconfined_u' to 'system_u'
Notice: /Stage[main]/Forge_server::Files/Forge_server::Mkdir[/var/run/puppet-forge-server]/Exec[forge_server_mkdir_p_/var/run/puppet-forge-server]/returns: executed successfully
Notice: /Stage[main]/Forge_server::Files/File[/var/run/puppet-forge-server]/owner: owner changed 'root' to 'forge'
Notice: /Stage[main]/Forge_server::Files/File[/var/run/puppet-forge-server]/group: group changed 'root' to 'forge'
Notice: /File[/var/run/puppet-forge-server]/seluser: seluser changed 'unconfined_u' to 'system_u'
Notice: /Stage[main]/Forge_server::Service/Service[puppet-forge-server]/ensure: ensure changed 'stopped' to 'running'
Notice: Finished catalog run in 9.56 seconds
[root@localhost manifests]#
```
@i11 i11 force-pushed the master branch 22 times, most recently from 249b039 to 8f73ed0 Compare October 3, 2018 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant