---
title: "ruby make: *** No rule to make target `/include/ruby.h', needed by `ossl.o' 错误"
author: "samwalt"
date: "2017-04-26T09:55:58Z"
tags: []
categories: ["编程语言"]
slug: "ruby-make-no-rule-to-make-target-include-ruby-h-needed-by-ossl-o"
draft: false
lastmod: "2017-04-26T09:55:58Z"
id: 2371253
url: "https://samwalt.iteye.com/blog/2371253"
---

ruby gem 安装OpenSSL支持时


```shell
ruby extconf.rb
make
```


这时出错，make: *** No rule to make target `/include/ruby.h', needed by `ossl.o'

其实是ext/openssl/Makefile中忘了给路径变量top_srcdir赋值,调用的时候当然就报错了，修改 Makefile 增加 top_srcdir = ../..

见： http://seoaqua.com/ruby-2.1-openssl/