-
Notifications
You must be signed in to change notification settings - Fork 323
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
Installing on Ubuntu 22.04 LTS fails #202
Comments
sudo gem install smashing
/usr/bin/ruby3.0 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20240215-27045-ytn75t.rb extconf.rb You might have to install separate package for the ruby development extconf failed, exit code 1 Gem files will remain installed in /var/lib/gems/3.0.0/gems/eventmachine-1.2.7 for inspection. |
ruby --version |
Thanks for the issue with detailed information. I have Ubuntu 22.04 LTS too, so I should be able to try to reproduce it and compare environment settings. I'm leaving this GitHub notification in my GH Inbox, and will update it once I have some spare time to test it 👍 Cheers. |
Thanks kinow |
@github6043 reading this now at home,
This might fail if as the message says
Do you have ruby-dev in your Ubuntu? Here's what I have: kinow@ranma:~$ dpkg -l | grep ruby-dev
ii ruby-dev:amd64 1:3.0~exp1 amd64 Header files for compiling extension modules for Ruby (default version) I also use this laptop I am using to write this message, with Ubuntu LTS to build and upload the gem to RubyGems, so it should work for you as we have a similar environment, except if you don't have the Ruby dev package. |
Hi Bruno
�
I did sudo apt install ruby-dev
Then I get
�
dpkg -l | grep ruby
ii libruby3.0:amd64 3.0.2-7ubuntu2.4 amd64 Libraries necessary to run Ruby 3.0
ii rake 13.0.6-2 all ruby make-like utility
ii ruby 1:3.0~exp1 amd64 Interpreter of object-oriented scripting language Ruby (default version)
ii ruby-dev:amd64 1:3.0~exp1 amd64 Header files for compiling extension modules for Ruby (default version)
ii ruby-net-telnet 0.1.1-2 all telnet client library
ii ruby-rubygems 3.3.5-2 all Package management framework for Ruby
ii ruby-webrick 1.7.0-3 all HTTP server toolkit in Ruby
ii ruby-xmlrpc 0.3.2-1ubuntu0.1 all XMLRPC library for Ruby
ii ruby3.0 3.0.2-7ubuntu2.4 amd64 Interpreter of object-oriented scripting language Ruby
ii ruby3.0-dev:amd64 3.0.2-7ubuntu2.4 amd64 Header files for compiling extension modules for the Ruby 3.0
ii ruby3.0-doc 3.0.2-7ubuntu2.4 all Documentation for Ruby 3.0
ii rubygems-integration 1.18 all integration of Debian Ruby packages with Rubygems
�
Looks good now.
�
Then
�
sudo gem install bundler
sudo gem install smashing
�
and get
�
sudo gem install smashing
Fetching tilt-2.3.0.gem
Fetching eventmachine-1.2.7.gem
Fetching daemons-1.4.1.gem
Fetching thin-1.8.2.gem
Fetching concurrent-ruby-1.2.3.gem
Fetching thor-1.3.0.gem
Fetching sprockets-4.2.1.gem
Fetching rack-2.2.8.gem
Fetching mustermann-2.0.2.gem
Fetching rack-protection-2.2.4.gem
Fetching ruby2_keywords-0.0.5.gem
Fetching sinatra-2.2.4.gem
Fetching multi_json-1.15.0.gem
Fetching sinatra-contrib-2.2.4.gem
Fetching ffi-1.16.3.gem
Fetching sassc-2.4.0.gem
Fetching raabro-1.4.0.gem
Fetching tzinfo-2.0.6.gem
Fetching et-orbi-1.2.7.gem
Fetching fugit-1.9.0.gem
Fetching rufus-scheduler-3.9.1.gem
Fetching execjs-2.9.1.gem
Fetching coffee-script-source-1.12.2.gem
Fetching coffee-script-2.4.1.gem
Fetching smashing-1.3.6.gem
Successfully installed thor-1.3.0
Successfully installed rack-2.2.8
Building native extensions. This could take a while...
ERROR: Error installing smashing:
ERROR: Failed to build gem native extension.
�
current directory: /var/lib/gems/3.0.0/gems/eventmachine-1.2.7/ext
/usr/bin/ruby3.0 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20240215-2230124-1vlpph.rb extconf.rb
checking for -lcrypto... *** 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.
�
Provided configuration options:
…--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)3.0
--with-ssl-dir
--without-ssl-dir
--with-ssl-include
--without-ssl-include=${ssl-dir}/include
--with-ssl-lib
--without-ssl-lib=${ssl-dir}/lib
--with-openssl-config
--without-openssl-config
--with-pkg-config
--without-pkg-config
--with-crypto-dir
--without-crypto-dir
--with-crypto-include
--without-crypto-include=${crypto-dir}/include
--with-crypto-lib
--without-crypto-lib=${crypto-dir}/lib
--with-cryptolib
--without-cryptolib
/usr/lib/ruby/3.0.0/mkmf.rb:471:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/lib/ruby/3.0.0/mkmf.rb:564:in `try_link0'
from /usr/lib/ruby/3.0.0/mkmf.rb:582:in `try_link'
from /usr/lib/ruby/3.0.0/mkmf.rb:801:in `try_func'
from /usr/lib/ruby/3.0.0/mkmf.rb:1029:in `block in have_library'
from /usr/lib/ruby/3.0.0/mkmf.rb:971:in `block in checking_for'
from /usr/lib/ruby/3.0.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /usr/lib/ruby/3.0.0/mkmf.rb:331:in `open'
from /usr/lib/ruby/3.0.0/mkmf.rb:361:in `block in postpone'
from /usr/lib/ruby/3.0.0/mkmf.rb:331:in `open'
from /usr/lib/ruby/3.0.0/mkmf.rb:357:in `postpone'
from /usr/lib/ruby/3.0.0/mkmf.rb:970:in `checking_for'
from /usr/lib/ruby/3.0.0/mkmf.rb:1024:in `have_library'
from extconf.rb:8:in `block in check_libs'
from extconf.rb:8:in `all?'
from extconf.rb:8:in `check_libs'
from extconf.rb:95:in `<main>'
�
To see why this extension failed to compile, please check the mkmf.log which can be found here:
�
/var/lib/gems/3.0.0/extensions/x86_64-linux/3.0.0/eventmachine-1.2.7/mkmf.log
�
extconf failed, exit code 1
�
Gem files will remain installed in /var/lib/gems/3.0.0/gems/eventmachine-1.2.7 for inspection.
Results logged to /var/lib/gems/3.0.0/extensions/x86_64-linux/3.0.0/eventmachine-1.2.7/gem_make.out
�
�
From: Bruno P. Kinoshita ***@***.***>
Sent: Thursday, February 15, 2024 8:12 PM
To: Smashing/smashing ***@***.***>
Cc: github6043 ***@***.***>; Mention ***@***.***>
Subject: Re: [Smashing/smashing] Installing on Ubuntu 22.04 LTS fails (Issue #202)
�
@github6043 <https://github.com/github6043> reading this now at home,
ERROR: Failed to build gem native extension.
This might fail if as the message says
/usr/bin/ruby3.0 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20240215-27045-ytn75t.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.
Do you have ruby-dev in your Ubuntu? Here's what I have:
$ dpkg -l | grep ruby-dev
|
in the Logfile I see
�
package configuration for openssl is not found
"x86_64-linux-gnu-gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-3.0.0 -I/usr/include/ruby-3.0.0/ruby/backward -I/usr/include/ruby-3.0.0 -I. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/ruby3.0-ohOwi0/ruby3.0-3.0.2=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -lruby-3.0 -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return !!argv[argc];
6: }
/* end */
�
From: Bruno P. Kinoshita ***@***.***>
Sent: Thursday, February 15, 2024 8:12 PM
To: Smashing/smashing ***@***.***>
Cc: github6043 ***@***.***>; Mention ***@***.***>
Subject: Re: [Smashing/smashing] Installing on Ubuntu 22.04 LTS fails (Issue #202)
�
@github6043 <https://github.com/github6043> reading this now at home,
ERROR: Failed to build gem native extension.
This might fail if as the message says
/usr/bin/ruby3.0 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20240215-27045-ytn75t.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.
Do you have ruby-dev in your Ubuntu? Here's what I have:
$ dpkg -l | grep ruby-dev
|
after this
�
apt install build-essential libssl-dev
�
I get
�
sudo gem install smashing
Building native extensions. This could take a while...
Successfully installed eventmachine-1.2.7
ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory - getcwd
�
From: Bruno P. Kinoshita ***@***.***>
Sent: Thursday, February 15, 2024 8:12 PM
To: Smashing/smashing ***@***.***>
Cc: github6043 ***@***.***>; Mention ***@***.***>
Subject: Re: [Smashing/smashing] Installing on Ubuntu 22.04 LTS fails (Issue #202)
�
@github6043 <https://github.com/github6043> reading this now at home,
ERROR: Failed to build gem native extension.
This might fail if as the message says
/usr/bin/ruby3.0 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20240215-27045-ytn75t.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.
Do you have ruby-dev in your Ubuntu? Here's what I have:
$ dpkg -l | grep ruby-dev
|
Installed now, thanks Bruno
sudo gem install smashing |
Well, close, but not ready yet smashing new icinga bundle smashing start |
I think you might need Node. Smashing uses CoffeeScript which requires node to convert it to JS (if I remember well). |
But good progress!!! |
Yesssss, node did the Job.
�
smashing start
2024-02-15 22:14:55 +0000 Thin web server (v1.8.2 codename Ruby Razor)
2024-02-15 22:14:55 +0000 Maximum connections set to 1024
2024-02-15 22:14:55 +0000 Listening on 0.0.0.0:3030, CTRL+C to stop
�
Best regards and thanks for supporting
�
From: Bruno P. Kinoshita ***@***.***>
Sent: Thursday, February 15, 2024 10:54 PM
To: Smashing/smashing ***@***.***>
Cc: github6043 ***@***.***>; Mention ***@***.***>
Subject: Re: [Smashing/smashing] Installing on Ubuntu 22.04 LTS fails (Issue #202)
�
But good progress!!!
—
Reply to this email directly, view it on GitHub <#202 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AJXVL2IXTJM72UYBAFPNN43YTZ7YDAVCNFSM6AAAAABDKDRO4OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBXGQYDCMBYGY> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/AJXVL2KK3VR4HV27KSXXB7LYTZ7YDA5CNFSM6AAAAABDKDRO4OWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTUCL5X4.gif> Message ID: ***@***.*** ***@***.***> >
|
Excellent! I'll leave it to you to close to confirm it's working on Ubuntu LTS now. 👍 |
Hi again, one final question, how to connect to Icinga2 API, the same way as in former Dashing ? |
Icinga2? I haven't used it in a long time. But the gist is that you will have to choose a Ruby HTTP client (Net::HTTP, RestClient, HTTPParty, etc.), and write the code that queries the Icinga2 REST API for what you want. This code needs to be called in a job. And you must choose where to store the Auth data for your job to use somewhere safely. The easiest way is to look at the Dashing/Smashing examples, and see if they work out of the box (there might be someone on GitHub maintaining a widget + job for this), or use that code as base. Then if you make it generic so others can use, you can update our Wiki with a link to your widget repo. |
Hi, any help is appreciated. I'm stuck with this, former Installation was Dashing on Ubuntu 20 LTS, I had to migrate to 22 LTS
Step two does not work 👍
Install bundler
$ gem install bundler
Install smashing
$ gem install smashing
Create a new project
$ smashing new my-project
Change Directory into the project
$ cd my-project
Install the bundle of project specific gems
$ bundle
Start the example dashboard!
$ smashing start
*ERROR: Error installing smashing:
ERROR: Failed to build gem native extension.
/usr/bin/ruby3.0 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20240215-255135-jefh5k.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/3.0.0/gems/eventmachine-1.2.7 for inspection.
Results logged to /var/lib/gems/3.0.0/extensions/x86_64-linux/3.0.0/eventmachine-1.2.7/gem_make.out
The text was updated successfully, but these errors were encountered: