# "mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h" building the Travis gem

**URL:** <https://travis-ci.community/t/mkmf-rb-cant-find-header-files-for-ruby-at-usr-lib-ruby-include-ruby-h-building-the-travis-gem/4527>\
**Category:** Travis CI Discussions & Feedback\
**Tags:** cli\
**Created:** [August 3, 2019, 2:54pm UTC](https://travis-ci.community/t/mkmf-rb-cant-find-header-files-for-ruby-at-usr-lib-ruby-include-ruby-h-building-the-travis-gem/4527 "2019-08-03T14:54:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dregad](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/dregad/32/2412_2.png) [@dregad](https://travis-ci.community/u/dregad)\
**Post date:** [August 3, 2019, 2:54pm UTC](https://travis-ci.community/t/mkmf-rb-cant-find-header-files-for-ruby-at-usr-lib-ruby-include-ruby-h-building-the-travis-gem/4527/1 "2019-08-03T14:54:51Z")

</div>

I’m trying to validate my travis.yml file locally. Following directions in

> **[Validating .travis.yml files](https://support.travis-ci.com/hc/en-us/articles/115002904174-Validating-travis-yml-files)**
>
> Validating your .travis.yml file before committing it reduces common build errors such as
> 
> invalid YAML
> 
> missing language key
> unsupported runtime versions of Ruby, PHP, OTP, etc
> deprecated features...

1. **online validation**  
The provided link leads to [http://lint.travis-ci.org/](http://lint.travis-ci.org/), which states that the tool is deprecated
2. **command-line validation**  
The tool does not install, don’t know why. Here’s the output I get:

```auto
$ sudo gem install travis --no-rdoc --no-ri
Building native extensions. This could take a while...
ERROR: Error installing travis:
	ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.5.0/gems/ffi-1.11.1/ext/ffi_c
/usr/bin/ruby2.5 -r ./siteconf20190803-19645-1nampuq.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.5.0/gems/ffi-1.11.1 for inspection.
Results logged to /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/ffi-1.11.1/gem_make.out

```

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [August 3, 2019, 4:27pm UTC](https://travis-ci.community/t/mkmf-rb-cant-find-header-files-for-ruby-at-usr-lib-ruby-include-ruby-h-building-the-travis-gem/4527/2 "2019-08-03T16:27:13Z")

</div>

If your `ruby` is installed with the system’s package manager, you may need a package named something like `ruby-devel` or `ruby-dev` to get the headers to build native extensions.

---

<div class="post-metadata">

**Author:** ![dregad](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/dregad/32/2412_2.png) [@dregad](https://travis-ci.community/u/dregad)\
**Post date:** [August 5, 2019, 8:00am UTC](https://travis-ci.community/t/mkmf-rb-cant-find-header-files-for-ruby-at-usr-lib-ruby-include-ruby-h-building-the-travis-gem/4527/3 "2019-08-05T08:00:07Z")

</div>

@native-api thanks for your response and advice. I don’t develop under Ruby, so I’m using whatever comes installed with Ubuntu 19.04. I’ll try to add the ruby-dev package as you suggested to try and fix the issue.

It would be nice to have some feedback from the team about when the _new WebLint tool_ mentioned at [http://lint.travis-ci.org/](http://lint.travis-ci.org/) will be available.

---

<div class="post-metadata">

**Author:** ![dregad](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/dregad/32/2412_2.png) [@dregad](https://travis-ci.community/u/dregad)\
**Post date:** [August 8, 2019, 6:58am UTC](https://travis-ci.community/t/mkmf-rb-cant-find-header-files-for-ruby-at-usr-lib-ruby-include-ruby-h-building-the-travis-gem/4527/4 "2019-08-08T06:58:19Z")

</div>

@native-api `sudo apt install ruby-dev` did the trick ! Many thanks for your help.
