# Segmentation fault zlib.so

**URL:** <https://www.ruby-forum.com/t/segmentation-fault-zlib-so/193583>\
**Category:** Ruby\
**Created:** [August 20, 2010, 2:01am UTC](https://www.ruby-forum.com/t/segmentation-fault-zlib-so/193583 "2010-08-20T02:01:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![parvg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bbe5ce/32.png) [@parvg](https://www.ruby-forum.com/u/parvg)\
**Post date:** [August 20, 2010, 2:01am UTC](https://www.ruby-forum.com/t/segmentation-fault-zlib-so/193583/1 "2010-08-20T02:01:28Z")

</div>

Hi I’m getting the following error when I do “gem list”:

C:/Ruby187/lib/ruby/1.8/i386-mingw32/zlib.so: [BUG] Segmentation fault  
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]

I’m running on Windows server 2008 64bit.

Has anybody run into similar problem?

Thanks in advance for your help.

Parvinder

---

<div class="post-metadata">

**Author:** ![parvg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bbe5ce/32.png) [@parvg](https://www.ruby-forum.com/u/parvg)\
**Post date:** [August 20, 2010, 1:29pm UTC](https://www.ruby-forum.com/t/segmentation-fault-zlib-so/193583/2 "2010-08-20T13:29:57Z")

</div>

Parv G. wrote:

> Hi I’m getting the following error when I do “gem list”:
> 
> C:/Ruby187/lib/ruby/1.8/i386-mingw32/zlib.so: [BUG] Segmentation fault  
> ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
> 
> I’m running on Windows server 2008 64bit.
> 
> Has anybody run into similar problem?
> 
> Thanks in advance for your help.
> 
> Parvinder

If I do a “gem install \<\>” I see a different error:

C:/Ruby187/lib/ruby/1.8/i386-mingw32/openssl.so: [BUG] Segmentation  
fault  
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]

---

<div class="post-metadata">

**Author:** ![parvg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bbe5ce/32.png) [@parvg](https://www.ruby-forum.com/u/parvg)\
**Post date:** [August 20, 2010, 2:21pm UTC](https://www.ruby-forum.com/t/segmentation-fault-zlib-so/193583/3 "2010-08-20T14:21:03Z")

</div>

On Aug 19, 9:01 pm, “Parv G.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi I’m getting the following error when I do “gem list”:
> 
> C:/Ruby187/lib/ruby/1.8/i386-mingw32/zlib.so: [BUG] Segmentation fault  
> ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
> 
> I’m running on Windows server 2008 64bit.
> 
> Has anybody run into similar problem?

Do you have any previous Ruby installation in the PATH?

A segmentation fault in zlib.so might indicate a version zlib1.dll  
different than the one the extension is expecting.

Try “where zlib1.dll”, if the directory shown by that is not C:  
\Ruby187\bin then the file is not safe to be the one that ship with  
RubyInstaller and should be removed.

HTH,

---

<div class="post-metadata">

**Author:** ![parvg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bbe5ce/32.png) [@parvg](https://www.ruby-forum.com/u/parvg)\
**Post date:** [August 20, 2010, 2:38pm UTC](https://www.ruby-forum.com/t/segmentation-fault-zlib-so/193583/4 "2010-08-20T14:38:48Z")

</div>

Luis L. wrote:

> On Aug 19, 9:01ï¿½pm, “Parv G.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Hi I’m getting the following error when I do “gem list”:
> > 
> > C:/Ruby187/lib/ruby/1.8/i386-mingw32/zlib.so: [BUG] Segmentation fault  
> > ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
> > 
> > I’m running on Windows server 2008 64bit.
> > 
> > Has anybody run into similar problem?
> 
> Do you have any previous Ruby installation in the PATH?
> 
> A segmentation fault in zlib.so might indicate a version zlib1.dll  
> different than the one the extension is expecting.
> 
> Try “where zlib1.dll”, if the directory shown by that is not C:  
> \Ruby187\bin then the file is not safe to be the one that ship with  
> RubyInstaller and should be removed.
> 
> HTH,

Luis, thanks for the reply.

It does not seem like there is another version of zlib1.dll:

> where zlib1.dll  
> C\Ruby187\bin\zlib1.dll

I checked the Path and didn’t see any other ruby entries except for  
‘C:\Ruby187\bin’.

Part of the issue is that I did not see a gems directory after intalling  
ruby (tried the 3 most recent windows installers).

Parvinder

---

<div class="post-metadata">

**Author:** ![parvg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bbe5ce/32.png) [@parvg](https://www.ruby-forum.com/u/parvg)\
**Post date:** [August 20, 2010, 6:38pm UTC](https://www.ruby-forum.com/t/segmentation-fault-zlib-so/193583/5 "2010-08-20T18:38:39Z")

</div>

On Aug 20, 9:38 am, “Parv G.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ruby (tried the 3 most recent windows installers).

This fails too?

ruby -ve “requite ‘zlib’”

Does ‘gem env’ command fails too?

It is strange if no zlib1.dll is in the path, it is loading the wrong  
one.

Do you have antivirus? it might be something that affected the  
original zlib1.dll that is part of 1.8.7 release.

Did you use the installers?

---

<div class="post-metadata">

**Author:** ![parvg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bbe5ce/32.png) [@parvg](https://www.ruby-forum.com/u/parvg)\
**Post date:** [August 20, 2010, 6:46pm UTC](https://www.ruby-forum.com/t/segmentation-fault-zlib-so/193583/6 "2010-08-20T18:46:51Z")

</div>

On Aug 20, 6:15 am, Luis L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Do you have any previous Ruby installation in the PATH?
> 
> A segmentation fault in zlib.so might indicate a version zlib1.dll  
> different than the one the extension is expecting.
> 
> Try “where zlib1.dll”, if the directory shown by that is not C:  
> \Ruby187\bin then the file is not safe to be the one that ship with  
> RubyInstaller and should be removed.

Another case for using pr-zlib, at least on Windows. 🙂

Dan
