Posts tagged linux

Installing MySQL for Python in Ubuntu

0

иконографияКартинивик услугиWhilst on the grind this evening, hacking on some Python code in a newly-installed Ubuntu virtual machine, I needed to install MySQL for Python. Building the package, pre-installation, requires mysql_config — which I had some difficulty locating in the repositories. After flailing about a bit, the solution is to install the libmysqlclient-dev package.

$ sudo apt-get install libmysqlclient-dev

The package also requires setuptools, which is available here. Download it (I’m running Python 2.6.5, so I downloaded setuptools-0.6c11-py2.6.egg) and run it as a shell script.

$ sh ~/Downloads/setuptools-0.6c11-py2.6.egg 

A second error — i.e. gcc could not find python.h — was resolved by installing the Python development package.

$ sudo apt-get install python-dev

Back to it …

Netflix “Error N8156-6013″ Resolution

17

A seemingly pervasive problem purportedly caused by a recent update to Silverlight, the Netflix streaming player bombed-out on me this evening, whinging about “Error N8156-6013″ and complaining that it had issues both with playing DRM content and — for reasons which transcend reason — the date on my (virtual) computer. The solution was simple enough. Delete the following small file:

C:\Documents and Settings\All Users\Application Data\Microsoft\PlayReady\mspr.hds

I was back to cackling irreverently at Archer in no time.

Virtualbox + XP + Firefox = Netflix in GNU/Linux

4

Having recently wrested control of my machine from Windows Vista, I’ve had to implement a workaround for Netflix streaming media. Netflix, unfortunately, has yet to see the mistake in building their streaming architecture on Microsoft’s near-dead Silverlight platform. Until they recognize the error of their ways, I need a workaround. I’ve settled on virtualizing XP, as Silverlight (and Moonlight, for that matter) will not successfully run Netflix in WINE. (As a side note, WINE runs Excel 2007 — one of my must-have Windows apps — flawlessly and, ironically, faster than my Windows installation used to.)

So, I installed VirtualBox OSE from the Lucid repo (a few versions behind current, but no worries) and installed my XP Pro SP3 image on a small virtual hard disk. It took entirely too long, although I had shortcut the process by ripping the CD to my hard disk using dd (+1 for GNU!):

$ dd if=/dev/cdrom of=~/home/captivus/win_xp.iso

(Seriously … dd is bloody brilliant. One of the most useful tools in the GNU suite.) Anyway, it works like a charm and I’m not without my new love, Archer, despite no longer running Windows.

The Liberation of My Workstation

1

“DAMN you, Vista! I shall liberate my workstation from your death-grip forthwith!”

With this clarion declaration which, in my oppression-stoked rage, was made with all of the sentiment and perturbation of rebels and patriots gone before me, (is the analogy a bit Philistine? Certainly …) I threw off the chains of The Beast and replaced Windows forever with my favorite Linux distribution.

I’ve long since made Linux my sole operating system on nearly every box on my network. To date, though, I have retained Windows on my primary workstation, running both Debian and Ubuntu in virtual machines, due to my dependence on several software packages which are not available (either to me or at all) for Linux. I was determined this evening, however, to inch away from this by dual-booting Linux with Vista. Several hours later, to my fury, my plans were thwarted when, twice, the NTFS partition would not resize with gparted! This was particularly frustrating as I waited nearly 2 hours each time for gparted to fail on the resize operation. Bloody NTFS!

So, with Eddie Izzard’s beguiling comedy as a soundtrack, I dumped a back-up of my files onto my archive hard drive on the workstation, and deleted that bloody NTFS partition once and for all! Let the death knell for Windows ring out! I’d rather virtualize Windows on an as-needed basis than be strong-armed into what I can and cannot install on my own hardware.

Superfluous fstab Entries After Upgrading to Lucid LTS

0

A quick post to outline a stupefying problem I encountered after upgrading one of my machines to Ubuntu Lucid (10.04) this weekend. By way of background, I am anything but an early-adopter of OS releases — especially on my production hardware. I haven’t the time to debug network-critical software on systems on which I rely heavily, so I typically lag a major-version-release or so behind the “cutting edge”.

Yesterday I finally made the move to upgrade to Lucid LTS on one of my servers on my home network. The automatic upgrade apps downloaded and executed without a hitch, so I was optimistic upon reboot. For reasons which surpass understanding, however, I received an error indicating that the hard disk upon which I had installed the OS refused to mount at boot time — although, to Lucid’s credit, I was given an option to skip this mounting and continue with the boot.

The whole episode was absurd, as the disk was clearly mounted and booting — how else was the OS loading at all if the disk upon which it resides would not boot? Upon logging in, a quick cat /var/log/boot.log suggested that there was, indeed, an error in mounting /dev/sda1. cat /etc/fstab made clear what the problem was — somehow there were additional entries in the fstab file which tried to mount the partitions on /dev/sda subsequent to their initial mounting. I’ve not the slightest idea how these entries made their way into the file. I am, however, confident that they were not there prior to the upgrade as this error was entirely new. A few keystrokes in vim and I had commented-out the offending entries. Upon reboot, all was well with the server.

Most perplexing …

Go to Top