The switch must go on
September 25, 2005 1:16 PM Subscribe
How do I get rid of my hastily installed Ruby 1.8.2. from my Mac, while leaving behind the version that came preinstalled?
I admit I didn't know that Ruby came preinstalled on my brand new Mac. So I forged ahead and installed a downloaded version. Except there were some strange looking errors during "make" and "make install-doc" which I don't understand... Unix I'm okay with, but I don't grok makefiles and GCC yet. So now I've got ruby in /usr/bin and /usr/local/bin. Is it safe to delete the one in /usr/local/bin? There are other binaries in there, all of which look suspiciously related to Ruby: erb, irb, rdoc, ri, and testrb. Can I safely trash all of these?
I admit I didn't know that Ruby came preinstalled on my brand new Mac. So I forged ahead and installed a downloaded version. Except there were some strange looking errors during "make" and "make install-doc" which I don't understand... Unix I'm okay with, but I don't grok makefiles and GCC yet. So now I've got ruby in /usr/bin and /usr/local/bin. Is it safe to delete the one in /usr/local/bin? There are other binaries in there, all of which look suspiciously related to Ruby: erb, irb, rdoc, ri, and testrb. Can I safely trash all of these?
The easiest thing to do is probably just remove by hand everything that seems to be ruby-related under /usr/local/bin. You can try the following trick if you still have the working directory where you compiled it:
TEMPDIR=/tmp/rubytemp
make install DESTDIR=$TEMPDIR
find $TEMPDIR -type f | awk s,^$TEMPDIR,/usr/local, | xargs rm
This works by using the 'DESTDIR' function of standard makefiles (or at least those produced by autoconf / automake) to perform the installation step to a temporary location, and then use that as a list of files to remove from /usr/local. The above is not tested and may have typos, but the general technique should work (as long as the ruby makefile honors DESTDIR.)
posted by Rhomboid at 5:45 PM on September 25, 2005
TEMPDIR=/tmp/rubytemp
make install DESTDIR=$TEMPDIR
find $TEMPDIR -type f | awk s,^$TEMPDIR,/usr/local, | xargs rm
This works by using the 'DESTDIR' function of standard makefiles (or at least those produced by autoconf / automake) to perform the installation step to a temporary location, and then use that as a list of files to remove from /usr/local. The above is not tested and may have typos, but the general technique should work (as long as the ruby makefile honors DESTDIR.)
posted by Rhomboid at 5:45 PM on September 25, 2005
You can safely delete anything in /usr/local. This will only affect things that you have compiled/installed yourself. The pre-installed version (in /usr) will not be affected.
posted by mbrubeck at 5:47 PM on September 25, 2005
posted by mbrubeck at 5:47 PM on September 25, 2005
Response by poster: I've deleted the stuff out of /usr/local/bin and /usr/local/lib. Now the problem is that I've deleted libruby* from /usr/lib as well. Sigh. Is there an easy way to get them back there?
posted by patgas at 8:53 PM on September 25, 2005
posted by patgas at 8:53 PM on September 25, 2005
patgas, only two items in my /usr/lib folder matched the libruby* pattern you specified:
posted by RichardP at 10:15 PM on September 25, 2005
$ ls -alF libruby* -rwxr-xr-x 1 root wheel 793384 Sep 22 17:29 libruby.1.dylib* lrwxr-xr-x 1 root wheel 15 Apr 2 20:40 libruby.dylib@ -> libruby.1.dylibOne is obviously the ruby library, the other a symbolic link to the library. I've placed a copy of libruby.1.dylib (in a Zip file) online. Note that the modification date on my libruby is Sep 22, 2005. This is because I am running Mac OS X 10.4.2 with Security Update 2005-008, which contained a security patch for Ruby. If that is the correct version for you, download my libruby, double click to unzip, move to /usr/lib, and recreate the symbolic link yourself with
ln
.posted by RichardP at 10:15 PM on September 25, 2005
This doesn't help your case now, but I will re-iterate this point if you are not familiar with gcc and make and whatnot:
Fink DarwinPorts Fink DarwinPorts Fink DarwinPorts Fink DarwinPorts
Building software is second nature to me, and I still use Fink on a regular basis. Beautiful piece of software.
posted by symphonik at 9:43 AM on September 26, 2005
Fink DarwinPorts Fink DarwinPorts Fink DarwinPorts Fink DarwinPorts
Building software is second nature to me, and I still use Fink on a regular basis. Beautiful piece of software.
posted by symphonik at 9:43 AM on September 26, 2005
Building Ruby, Rails, LightTPD, and MySQL on Tiger.
posted by chunking express at 11:57 AM on December 14, 2005
posted by chunking express at 11:57 AM on December 14, 2005
This thread is closed to new comments.
For the future, if you use one of the Mac OS X package managers like Fink or DarwinPorts to install a package, you can later instruct the package manager to uninstall it. This saves you the trouble of tracking down install and uninstall directions for each particular package.
posted by RichardP at 1:41 PM on September 25, 2005