algolia / algoliasearch-jekyll

⚠ DEPRECATED Use jekyll-algolia instead.
https://community.algolia.com/jekyll-algolia/
MIT License
125 stars 12 forks source link

Zlib missing #12

Closed jonathanulco closed 8 years ago

jonathanulco commented 8 years ago

Hello i'm a noob on ruby and i try to install gem algoliasearch-jekyll with command line like this and i have this issue

waratah@waratah-MS-7519:~$ sudo gem install algoliasearch-jekyll
Building native extensions.  This could take a while...
ERROR:  Error installing algoliasearch-jekyll:
    ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
checking for gzdopen() in -lz... no
zlib is missing; necessary for building libxml2
*** 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/ruby1.9.1
    --help
    --clean
    --use-system-libraries
    --enable-static
    --disable-static
    --with-zlib-dir
    --without-zlib-dir
    --with-zlib-include
    --without-zlib-include=${zlib-dir}/include
    --with-zlib-lib
    --without-zlib-lib=${zlib-dir}/lib
    --enable-cross-build
    --disable-cross-build

Gem files will remain installed in /var/lib/gems/1.9.1/gems/nokogiri-1.6.6.2 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/nokogiri-1.6.6.2/ext/nokogiri/gem_make.out

How can i fix it ? Thx

Jerska commented 8 years ago

Depending on your system, can you try your_package_manager(brew, apt-get, yum, ...) install zlib and retry installing it ? I'd also recommend you to use a Gemfile to manage your dependencies, but that's up to you and shouldn't change anything to this issue.

jonathanulco commented 8 years ago

I've tried with zlib-bin but no change. I will try gemfile. Thx

Jerska commented 8 years ago

Can you try with zlib-dev or zlib-devel too ?

jonathanulco commented 8 years ago

I didn't find zlib-dev but i found zlib1g-dev

sudo gem install algoliasearch-jekyll
Building native extensions.  This could take a while...
Fetching: algoliasearch-jekyll-0.5.3.gem (100%)
Successfully installed nokogiri-1.6.6.2
Successfully installed algoliasearch-jekyll-0.5.3
2 gems installed
Installing ri documentation for nokogiri-1.6.6.2...
Installing ri documentation for algoliasearch-jekyll-0.5.3...

RDoc::Parser::Ruby failure around line 142 of
lib/record_extractor.rb

Before reporting this, could you check that the file you're documenting
has proper syntax:

  /usr/bin/ruby1.9.1 -c lib/record_extractor.rb

RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

The internal error was:

    (RDoc::Error) unknown type of %string "i"

ERROR:  While generating documentation for algoliasearch-jekyll-0.5.3
... MESSAGE:   unknown type of %string "i"
... RDOC args: --ri --op /var/lib/gems/1.9.1/doc/algoliasearch-jekyll-0.5.3/ri lib LICENSE.txt README.md --title algoliasearch-jekyll-0.5.3 Documentation --quiet
Jerska commented 8 years ago

Seems like we're making some progress. It seems like you're using ruby 1.9.1 , could you try with the latest version?

Jerska commented 8 years ago

Actually, it seems like it's the documentation installation that failed, I'm not sure wether gem rollbacks on error or not, you might be able to use the gem anyway.

jonathanulco commented 8 years ago

Ok thx have a nice day.