Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Building Ruby 1.9.3 package for Debian Squeeze
# From a fresh install of squeeze
apt-get install ruby rubygems # Need ruby to use fpm
gem1.8 install fpm --no-ri --no-rdoc
apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev ncurses-dev libyaml-dev
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -zxvf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125
rm -rf /tmp/ruby193
time (./configure --prefix=/usr && make && make install DESTDIR=/tmp/ruby193)
/var/lib/gems/1.8/bin/fpm -s dir -t deb -n ruby193 -v 1.9.3-p125 --description "Self-packaged Ruby 1.9.3 patch 125" -C /tmp/ruby193 \
-p ruby193-VERSION_ARCH.deb -d "libstdc++6 (>= 4.4.3)" \
-d "libc6 (>= 2.6)" -d "libffi5 (>= 3.0.4)" -d "libgdbm3 (>= 1.8.3)" \
-d "libncurses5 (>= 5.7)" -d "libreadline6 (>= 6.1)" \
-d "libssl0.9.8 (>= 0.9.8)" -d "zlib1g (>= 1:1.2.2)" \
-d "libyaml-0-2 (>= 0.1.3)" \
usr/bin usr/lib usr/share/man usr/include
# Post installation test
apt-get remove ruby rubygems
apt-get install libffi5 libyaml-0-2
dpkg -i ruby193-p125_i386.deb
ruby -ropenssl -rzlib -rreadline -ryaml -e "puts :success"
@awesome

This comment has been minimized.

Copy link

awesome commented Sep 7, 2012

@futuremill thanks for this gist--you rock! so much fail with google search for a decent debian squeeze ruby 1.9.3 apt-get package... then this jewel!

@rexcze

This comment has been minimized.

Copy link

rexcze commented Apr 18, 2013

Thank you :-)

@andrejko

This comment has been minimized.

Copy link

andrejko commented Apr 24, 2013

Thanks a lot!

dpkg -i ruby193-1.9.3.-p125_i386.deb

instead of

dpkg -i ruby193-p125_i386.deb

on Debian 6

@juliankoehn

This comment has been minimized.

Copy link

juliankoehn commented Jun 27, 2013

Big thanks for sharing! <3

@mparisot-wescale

This comment has been minimized.

Copy link

mparisot-wescale commented Aug 2, 2013

You made my day, thanks!

@StephanieSunshine

This comment has been minimized.

Copy link

StephanieSunshine commented Aug 12, 2013

This worked for p448 with just a few minor modifications. Thank you so much for this, you really made my day.

@ggoral

This comment has been minimized.

Copy link

ggoral commented Aug 27, 2013

Thank you :-)

@skinney6

This comment has been minimized.

Copy link

skinney6 commented Nov 24, 2014

This is great. I'd like to make a 2.1.3 for Ubuntu 14.04. Where do you find out the dependencies?

@mogab9

This comment has been minimized.

Copy link

mogab9 commented Jan 15, 2015

Thanks buddy!

@thejandroman

This comment has been minimized.

Copy link

thejandroman commented Apr 4, 2016

Had to install a specific version of FPM to get it to work:

gem1.8 install fpm --no-ri --no-rdoc -v 1.2.0
@xi-ao

This comment has been minimized.

Copy link

xi-ao commented Jul 31, 2018

Thanks @futuremill for sharing, you saved my day!
And thanks to you @thejandroman for your tip regarding the version of FPM to install.

@andrejko You're right, an it might also be dpkg -i ruby193-1.9.3-p125_amd64.deb if you're on a x64 arch (that said, simply look at the generated package).

Edit: you might also want to force installing FFI ~ 1.9.10 as installing FPM may complain about FFI not being compatible with Ruby < 1.9.
The first lines should then be:

apt-get install ruby rubygems # Need ruby to use fpm
gem1.8 install ffi --no-ri --no-rdoc -v 1.9.10
gem1.8 install fpm --no-ri --no-rdoc -v 1.2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.