patrickdavey / vimwiki_markdown

A gem to use for converting vimwiki markdown files to html.
MIT License
144 stars 16 forks source link

Error installing vimwiki_markdown #36

Closed MahbubAlam231 closed 3 years ago

MahbubAlam231 commented 3 years ago

When I run

sudo gem install vimwiki_markdown

this is the following error that I get:

Building native extensions. This could take a while...
ERROR:  Error installing vimwiki_markdown:
    ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.7.0/gems/commonmarker-0.22.0/ext/commonmarker
/usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20210818-14573-1dygqb5.rb extconf.rb
creating Makefile

current directory: /var/lib/gems/2.7.0/gems/commonmarker-0.22.0/ext/commonmarker
make "DESTDIR=" clean

current directory: /var/lib/gems/2.7.0/gems/commonmarker-0.22.0/ext/commonmarker
make "DESTDIR="
compiling arena.c
arena.c:1:10: fatal error: stdlib.h: No such file or directory
    1 | #include <stdlib.h>
      |          ^~~~~~~~~~
compilation terminated.
make: *** [Makefile:245: arena.o] Error 1

make failed, exit code 2

Gem files will remain installed in /var/lib/gems/2.7.0/gems/commonmarker-0.22.0 for inspection.
Results logged to /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/commonmarker-0.22.0/gem_make.out

What's going on? I have latest ruby and vimwiki installed. I am using vim-nox.

patrickdavey commented 3 years ago

Short answer is "I don't know".

However, you can try to Google for some key phrases from the exception trace. For example, try searching for arena.c:1:10: fatal error: stdlib.h: No such file or directory ... if you do that you'll find these search results and the first link looks pretty promising.

As mentioned in the README please try using rvm first (also best practice not to install with sudo anyway).

I'm going to close this, as installing dependencies is explicitly not a bug in this gem.