Posts Tagged ‘lion’

Renamed /usr on Mac OS X —> panic

Friday, July 13th, 2012

I recently got a new mac and issued (like a baboon):


sudo mv /usr /usr_off

I immediately noticed that nearly everything in my computed stopped working. I could cd around but even ls produced:


Illegal instruction 4

errors. Of course I tried renaming the folder back but sudo and mv also produced this error.

I started freaking out when I tried to connect to a different mac and the whole thing froze. When I restarted I immediately got a kernel panic:


... Process 1 exec of /sbin/launchd failed ...

Booting in “Safe mode” (holding SHIFT) did not work.

The solution was to boot holding ALT and choose Recovery HD (luckily this exists because my MacBook Air has no DVD drive). After choosing the language and choosing Reinstall Mac Os X I was able to choose Terminal from the top menu bar. Here I could (scarily) issue:


cd /Volumes/Macintosh\ HD
mv /usr_off /usr

without ever giving a password.

I restarted and everything is back to normal.

Mosek, matlab and mac ox x 10.7

Wednesday, October 19th, 2011

I recently got a new work machine with mac os x 10.7. Already having visions of last summer when I had a laptop with 10.5 and a desktop with 10.6. We’ll see how this goes…

My first issue is a simple one. I installed mosek and as per the instructions I changed the ~/.MacOSX/environment.plist file to contain:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>DYLD_LIBRARY_PATH</key>
	<string>/usr/local/mosek/6/tools/platform/osx64x86/bin:/usr/local/mosek/6/tools/platform/osx32x86/bin:/usr/local/cuda/lib</string>
	<key>GL_ENABLE_DEBUG_ATTACH</key>
	<string>YES</string>
	<key>MOSEKLM_LICENSE_FILE</key>
	<string>/usr/local/mosek/6/licenses/mosek.lic</string>
</dict>
</plist>

But when I restarted matlab and issued


mosekopt

I saw that it was not finding the mosek binaries correctly:


??? Invalid MEX-file '/opt/local/mosek/6/toolbox/r2009b/mosekopt.mexmaci64':
dlopen(/opt/local/mosek/6/toolbox/r2009b/mosekopt.mexmaci64, 1): Library not loaded:
libmosek64.6.0.dylib
  Referenced from: /opt/local/mosek/6/toolbox/r2009b/mosekopt.mexmaci64
  Reason: image not found

The solution: Log out and back in.