Posted by Tres
Wed, 14 May 2008 00:51:00 GMT
I’m a big fan of package management systems for installing and managing everything on a *nix system. From portupgrade on FreeBSD to yum/RPM on RedHat, I use the package management system to install and maintain everything I possibly can.
On OS X, I’ve been using MacPorts back since they were Darwin Ports, and before that I was using Fink. MacPorts closely resembles portupgrade on FreeBSD.
MacPorts is generally excellent, especially because everything is tucked away in opt, so if I ever decide that I don’t want MacPorts around anymore, I have one place to go to get rid of everything.
Anyway, today was the first time I really had an issue with MacPorts. Trying to get Mysql5 installed on my laptop, I happened to download a corrupt tar archive.
sudo port install mysql5
---> Fetching mysql5
---> Attempting to fetch mysql-5.0.51.tar.gz from http://mysql.mirrors.pair.com/Downloads/MySQL-5.0/
---> Attempting to fetch mysql-5.0.51.tar.gz from http://mysql.he.net/Downloads/MySQL-5.0/
---> Verifying checksum(s) for mysql5
Error: Checksum (md5) mismatch for mysql-5.0.51.tar.gz
Error: Checksum (sha1) mismatch for mysql-5.0.51.tar.gz
Error: Checksum (rmd160) mismatch for mysql-5.0.51.tar.gz
Error: Target org.macports.checksum returned: Unable to verify file checksums
Error: Status 1 encountered during processing.
My response was to clean out the distfiles, like I would with FreeBSD. I thought I’d be nice and use the built-in port clean instead of just removing the downloaded file:
sudo port clean mysql5
---> Cleaning mysql5
But that just made MacPorts angrier:
sudo port install mysql5
---> Verifying checksum(s) for mysql5
Error: Target org.macports.checksum returned: Could not open file: /opt/local/var/macports/distfiles/mysql5/mysql-5.0.51a.tar.gz
Error: Status 1 encountered during processing.
The key was to use the –all flag on the port clean command:
sudo port clean --all mysql5
Posted in OS X, Sysadmin | Tags macports
Posted by Tres
Wed, 30 Apr 2008 06:38:00 GMT
If you’re experiencing problems with TextMate’s subversion commit window, the diff history or other UI windows just crashing, the problem may be because of Mac Ports.
Check out /var/log/system.log to find out where the crash log was written to. You should see something like this:
Apr 12 18:33:50 blas.phemo.us ReportCrash[1486]: Saved crashreport to /Users/tres/Library/Logs/CrashReporter/mate_2008-04-12-183348_ishmael.crash using uid: 512 gid: 512, euid: 512 egid: 512
Check out the contents of the file and you’ll see something like this:
Process: mate [485]
Path: /Applications/TextMate.app/Contents/SharedSupport/Support/bin/mate
Identifier: mate
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: ruby [471]
Date/Time: 2008-04-29 18:33:48.373 -0700
OS Version: Mac OS X 10.5.2 (9C7010)
Report Version: 6
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread: 0
Dyld Error Message:
Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /opt/local/lib/libJPEG.dylib
The important things to look for is the contents of the Dyld Error Message.
If you’re seeing a libjpeg error, it’s due to the installed version of libjpeg that you’ve got through Mac Ports. Luckily this is an easy one to resolve. Just copy the version from /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Resources/libJPEG.dylib to /opt/local/lib/libJPEG.dylib
sudo cp /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Resources/libJPEG.dylib /opt/local/lib/libJPEG.dylib
Posted in OS X, Development | Tags crash, subversion, textmate, window
Posted by Tres
Mon, 10 Jul 2006 06:59:49 GMT
Here’s a cool interface for customizing Cocoa applications will do:
SIMBL (Smart InputManager Bundle Loader) - pronounced like “symbol” or “cymbal” allows you to build hacks for Cocoa applications and apply the code selectively based on an application’s unique identifier. It’s not really all that smart, or even clever, but it’s smarter than just blindly loading code into an application.
And here’s megazoomer, an extension that will allow you to make any application use the entire screen by pressing command+enter:
Posted in OS X | Tags application, bundle, enhancement, SIMBL | no comments
Posted by Tres
Tue, 04 Jul 2006 13:45:12 GMT
If you’ve got a MacBook or PowerBook, and need to work on Cisco switches, you know that you’ve got to use a USB Serial dongle in order to do the job. But the problem is, first–finding a driver that will work for OS X, and second, sending the all-important BREAK to the Cisco device. I’ve had one of the IOGear -232A serial dongles for years now, it works just fine for everything EXCEPT sending a break.
I guess there’s a kludge involving changing baud rates and sending garbage, but I’m not really interested in kludges; this is why I use OS X, not Linux on my desktop – I just want things to work (this is not intended as a flame, just reality at present).
Anyway, I just found out that there’s a Sourceforge project providing open source drivers for the plethora of different brands that these devices are sold under.
http://sourceforge.net/projects/osx-pl2303/
I’ve still got to verify whether BREAK will work using the new drivers, but even if it doesn’t, and you’re looking for drivers for one of these devices, check out the sourceforge project.
Posted in OS X | Tags 232, dongle, drivers, Serial, USB | no comments