HowTo Fix: “[...] only available with the XS version of Scalar::Util”

Recently, we upgraded our systems, and one of the updates was an update to Perl. After this update, a portion of Bugzilla failed to work as expected; the problem turned out to be in SOAP::Lite:

# perl -MSOAP::Lite -e "print;"
weaken is only available with the XS version of Scalar::Util at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/ line 2502
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/ line 2502.
Compilation failed in require.
BEGIN failed--compilation aborted.

This is on a machine running Red Hat Enterprise Linux (RHEL) 5.7. The bug (Bug #375621) was initially reported back in November 2007 with RHEL 5.2. The final resolution came with bug #594768, where the problem was explained completely and resolved for good in RHEL 6.

The problem is that the updates to Perl are overwriting files added via CPAN. When this happens, versions that have an XS version are reverted back to their original forms without XS support. This appears to happen with Scalar::Util the most.

The fix is to reinstall the CPAN modules affected by the Perl upgrade. A force will be necessary. For example, this command to install Scalar::Util:

cpan> force install Scalar::Util
Running install for module Scalar::Util
Running make for G/GB/GBARR/Scalar-List-Utils-1.23.tar.gz
Fetching with LWP:
CPAN: Digest::MD5 loaded ok
Fetching with LWP:
Checksum for /root/.cpan/sources/authors/id/G/GB/GBARR/Scalar-List-Utils-1.23.tar.gz ok
Scanning cache /root/.cpan/build for sizes

Once the relevant modules are reinstalled, the files will be reverted back to the way they were before the upgrade took place – and all should be working again.

SOPA Blackout: 18 January 2012 (Updated)

Normally, we don’t discuss politics here on the blog. Followers of our Twitter account, however, will be unsurprised to learn that we are speaking out against the SOPA (H.R. 3261) and PIPA (S. 968) bills before the US Congress. (Our Twitter posts cover a much wider array of subject matter than the blog: freedom of speech, internet freedoms, productivity, organizing, freedom from unreasonable search and seizure, …)

There has been a lot of talk about these bills – bills that promise to kill the Internet as we know it and bring corporate censorship to America, and to kill the right to due process of law. Not only the very fabric of the Internet, but also the rule of law is at stake. These laws will basically criminalize the very tools used by dissidents world-wide – the tools that are promoted by the US State Department for avoiding censorship regimes.

There are a huge number of places you can go to get more information – but if SOPA were to pass, many of these sites would likely not be available. Today, January 18, you will get a glance at what that could be like: many popular sites will go “dark” and become unavailable for anywhere from 12 to 24 hours. These companies have stated they will be a part of the SOPA protest:

These sites have more information on SOPA and PIPA and why they are such a horrendously bad idea:

There is more detailed information on these bills at OpenCongress – there is a page on SOPA (H.R. 3261) and on PIPA (S. 968). Propublica also has a page on who supports and opposes SOPA and PIPA in the US Congress. A good central location for information is

Updates: Pardon the updates – there is a ton of good information out there, and many, many, many sites are taking part. I’m trying to gather the best information and put it all here (though that may be impossible!).

Upgrading from MySQL 5.1 to 5.5 on Ubuntu Lucid Lynx

I decided to try Percona’s MySQL server, and went for the most recent version (5.5). Unfortunately, the version of MySQL included with Ubuntu Lucid Lynx is 5.1 – so installing Percona’s 5.5 server means an upgrade.

This upgrade requires some additional steps beyond the usual.

First, the new MySQL 5.5 makes InnoDB the default storage engine – so anything that relies on that default will have to be changed. To revert this “change” you may need to add the following to your my.cnf:


Secondly, the mysql database will need updating. Run this command:

# su - mysql -c "mysqld_safe --init-file=/usr/share/mysql/mysql_system_tables.sql --verbose"

This runs the command as the mysql user; if you are using Ubuntu, the mysql user has a shell of /bin/false which causes this to fail. You can either give the mysql user a new shell (such as /bin/bash) by editing with the command vipw or you can run the mysql_safe command as root, like this:

# mysqld_safe --init-file=/usr/share/mysql/mysql_system_tables.sql --verbose

Once this command runs, make sure that the MySQL instance stops by running service mysql stop or mysqladmin shutdown.

This should fix things. One thing to watch out for is the innodb_buffer_pool_size – this is increased from a default of 128Mb to 132Mb; if you’ve tight memory you’ll want to plan for this.

Percona has a complete guide for migrating from 5.1 to 5.5; MySQL also has a thorough description of upgrading to 5.5. MariaDB 5.5 is not out yet, but there is instructions on upgrading to 5.3 (equivalent to MySQL 5.1).

Resetting the MacOS X 10.4 (Tiger) Admin Password (without disk!)

Resetting the MacOS X Tiger administrator password can be done by booting with the Installation Disk, and selecting the appropriate menu option. This is the most commonly referred to option, with a lot of high-quality instructions available via Google.

The problem is what to do when you have no disk – or it is too inconvenient to get it. In my case, the PowerPC Mac Mini that runs MacOS X Tiger has a bad DVD drive.

In most cases, resetting a password just requires physical access to the machine and a reboot. (This is why nearly all security professionals say, If you’ve physical access to the box, it’s over.)

With Tiger, you can indeed do this. (In fact, Leopard and Snow Leopard can too – it’s just more complicated.)

Start your MacOS X 10.4 system, and at the gray screen hit (and hold) Cmd-S to enter single user mode. The screen should go black, and white writing commences – kernel messages. You should eventually get a root prompt:


At this prompt, type in these three commands (terminated with a return, of course):

sh /etc/rc
passwd admin

(Replace admin with your administrator user’s short username.) When I did this, I found that if you waited too long after doing the command sh /etc/rc, then the system would take away your prompt. So don’t lag!

This article (from 2009) over at MacYourself is one of the most complete descriptions I’ve seen; this 2007 article at MacOSX Tips is nearly as complete and adds some more thoughts too.

These articles saved me; I hope they can be of some use to you too.

A Christmas Carol: A True Delight!

I don’t talk much outside of technology news – but I thought I would today.

Christmas may be past, but the spirit of giving and compassion is timeless – and in this spirit, it is a joy to experience Charles Dicken’s A Christmas Carol. And by far, the best experience of this story comes in these three tellings of the ageless story (in recommended order):

I just finished listening to Patrick Stewart’s one-man show – and it is a delight – highly recommended!

…and it was always said of him, that he knew how to keep Christmas well, if any man alive possessed the knowledge. May that be truly said of us, and all of us! And so, as Tiny Tim observed, God bless Us, Every One!

Debugging Problems with Chrome Extensions (and One You Can’t Live Without!)

I’ve had some niggling problems with my Chromium installation on Ubuntu 10.10, and just never got around to fixing them. Now I’ve not only fixed the one I most wanted to fix, but I also fixed others as well.

Before I discuss the solution… the problems.

The first problem I’ve had is that I couldn’t look at any of the pictures of Android phone displays in the Android Market. I could see them and click on them, but nothing would happen. Similarly, I could click on “more” to see more of the description, but nothing would happen.

Second major problem was with Mint: the “details” bar in the transaction list was off, and the current transaction highlight was also off: decidedly not conducive to reading or getting things done.

I knew that at least some of these problems had to do with extensions because the pages worked when the extensions were off. The quickest way to turn off all extensions in Chrome (assuming a default installation) isn’t to restart in safe mode or to disable extensions one by one – or even to use an extension to turn all the extension off: the quickest way is to use Incognito Mode. Simply copy the URL and paste it into an Incognito window and watch what happens.

To narrow it down further, I turned to another extension: One Click Extensions Manager. Between this and Incognito Mode, the amount of debugging time saved is just tremendous!

Using the One Click Extensions Manager, I turned off all extensions, then started enabling them one at a time. Before I knew it, my problems were resolved.

The problem with the Market turned out to be caused by a bug in Droid Code. I found this out by turning the extensions back on one by one. Turns out that this bug has been mentioned in the reviews; I just never saw it. Unfortunately, I use Droid Code all the time – however, I replaced it with the QR Code Generator for Android Market and now things work again.

After resolving the problem with the Android Market, I thought I’d do a Google search to find the problem with The problem with Mint turned out to have to do with the Orbvious Interest extension, an extension that provides quick access to Read-It-Later. Turned out there was a bug report (or two!) about this very problem.

Using One Click Extensions Manager made enabling and disabling extensions a one-click process: once the list of extensions is open, a single click will either enable/disable it (left-click) or uninstall it (right-click). It’s unbelievable until you try it: disabling in the Google Extensions Manager is a very slow process.

A side benefit to all of this is I got to clean out some of my extensions: I do tend to collect them willy-nilly (oh, the shame of it!).

Why NOT Having Goals is a Bad Idea

Recently, Leo Babuata (whom I normally greatly admire) had a guest post on why goals are a bad idea. This is an idea that seems to be growing; Leo wrote about achieving without goals in November in 2010 and another guest poster wrote about it in December of 2011. Leo’s first post about it may be the one from July of 2010. These posts on rejecting goals get me angry, honestly: they are a prescription for aimlessness and drifting.

The problems they list with goals are:

  • Goals are fixed and inflexible.
  • Goals require you to give up what you want now.
  • Goals require pain.
  • Goals are limiting.
  • Goals missed are the system’s fault.

Goals are objectives, targets, endings, and aims: without these, we do not know where we are going. When our directions and passions change, so does our goals. Changing our goals should not be seen as weakness, but strength: goals should be continually revised for our current desires.

Sometimes a goal is to give something up that we are doing now, to make a change. Giving up smoking or a constant soda pop habit is hard – and will cause pain. Yet, the giving up of the pleasure of a smoke now will add years to your life down the road and give your children more time with their parents.

However, this is not because of the goal: a goal can be positive as well: exercising daily, reading more, learning to fly, learning a new language. Goals give you direction and provide you with a marker to strive towards.

When we miss the target, we should look inside ourselves as to why and without feeling guilt. Was the goal a badly specified goal? (Probably.) Does it match our desires and passions? Most people have vague goals that are designed to be broken, and that will lead to failure sooner or later. Confucius said this:

In archery we have something like the way of the superior man. When the archer misses the center of the target, he turns round and seeks for the cause of his failure in himself.

Just don’t feel guilt about a missed goal: throw the goal out and make a new, more realistic one – one that is specific, measurable, attainable, and focused more on changing your daily habits. Switch from a goal of “Lose weight” (vague and impossible!) to “Lift weights daily.” Don’t measure output, don’t measure weight, just “don’t break the chain” – keep it up one day after another. If you get a daily habit like that, the weight will come off.

If you don’t have goals you can’t plan. Living with out a plan leads to lack of ambition and lack of direction. What do you want to achieve? Then figure your action steps – or better yet, daily habits – that will get you there. Accomplishing your goals – your end results – can only be done by first defining the objective, then using habits and actions to get there. If you’ve no goals, then you have nothing to accomplish – and that results in no accompilishments.

Leo presents this quote at the end of his July 2010 article:

A good traveller has no fixed plans, and is not intent on arriving. — Lao Tzu

I would counter this with some other quotes. Consider this one (emphasis added):

In all things success depends on previous preparation, and without such previous preparation there is sure to be failure. If what is to be spoken be previously determined, there will be no stumbling. If affairs be previously determined, there will be no difficulty with them. If one’s actions have been previously determined, there will be no sorrow in connection with them. If principles of conduct have been previously determined, the practice of them will be inexhaustible. — Confucius

Also, from Alice’s Adventures in Wonderland (one of my favorite books!), comes this delightful snippet:

“Would you tell me, please, which way I ought to go from here?”
“That depends a good deal on where you want to get to,” said the Cat.
“I don’t much care where–” said Alice.
“Then it doesn’t matter which way you go,” said the Cat.
“–so long as I get SOMEWHERE,” Alice added as an explanation.
“Oh, you’re sure to do that,” said the Cat, “if you only walk long enough.”
(Alice’s Adventures in Wonderland, Chapter 6)

To accomplish our goals, I recommend defining the goal using what David Allen calls “envisioning wild success” and “outcome visioning”. Then figure what daily habits and other actions will lead you to the end result.

There are programs to help with daily habits and I highly recommend using one of them. My favorites are Sciral Consistency for Macintosh and Habit Streak for Android.

Using SSH Agents with GNU Screen (and Byobu)

SSH is an encryption tool that allows you to connect to machines using an authenticated and encrypted connection. With an SSH agent, your authentication (and keys) can be “carried” from one system to the next. You load all of your keys on your local system into the agent, then connect to a remote system with the agent. Even though none of your keys are present on the remote system, they all exist and can be used to authenticate to another system.

This capability that the SSH agent gives you is very useful: you can keep all of your keys on a laptop or other personal system and only keep public keys on remote systems.

Running the agent is as simple as:

eval ssh-agent

This will load all keys that the agent can find (keys in your .ssh directory). You can add specific keys with:

ssh-add mykey

Replace mykey with your specific key name. If there is a password on the key, you only have to enter it once – at the very beginning.

Once the agent is configured, you can connect to a remote system with:

ssh -A host

The -A option tells SSH to use “Agent Forwarding” which is what allows us to take our keys “with” us from one host to the next.

Here is the really nice part: once you’ve connected to the place where your GNU screen sessions are located, copy the value of the SSH_AUTH_SOCK variable:

# set | grep SSH
SSH_CLIENT=' 42243 22'
SSH_CONNECTION=' 42243 22'

Take the value of SSH_AUTH_SOCK and input it into GNU screen:

:setenv SSH_AUTH_SOCK /tmp/ssh-ttQal19039/agent.19039

After this command is executed, start new sessions to your remote hosts. For the local host, it may be easiest just to restart the session – but you could also just set the variable SSH_AUTH_SOCK in your shell – such as this command for the Korn shell:

export SSH_AUTH_SOCK=/tmp/ssh-ttQal19039/agent.19039

To verify that the agent now works, use the command

ssh-add -l

. You should see all of your keys; if instead you see

Could not open a connection to your authentication agent.

then you should check the setting of SSH_AUTH_SOCK.

With SSH agents, agent forwarding, and GNU screen, you will find your authentication difficulties eased considerably.

UPDATE: Added information about not always having to restart screen sessions.

Why You Should NOT Ditch Windows XP

Nathan Bauman over at PCWorld had an article titled Why You Should Ditch Your Windows XP Laptop Right Now. This sort of pitch has always interested me after a fashion – the thinking just escapes me (as a personal Windows user). The reasoning for a corporate environment would be different, of course.

Here are the reasons Nathan lists for switching to Windows 7:

  1. Windows 7 is easier to use.
  2. Windows 7 is more secure.
  3. Windows 7 supports disks with 4K blocks.
  4. Windows 7 supports more than 2Gb memory.
  5. Windows 8 is a disaster – so get Windows 7 before it goes away.

There are many reasons to stay with Windows XP for now. Be aware that I’ve not yet purchased my own Windows XP – I still have Windows 2000 for when I need Windows (which is almost never).

One reason is that Windows XP runs on virtually anything you can pick up – even one-year old and two-year old (gasp!) hardware. Requirements are 128Mb memory recommended and 1.5Gb disk on a Pentium at 233MHz or better. Windows 7 requires four times the memory, approximately 16 times the disk space, and four times the CPU power.

This variance in requirements leads to much lower costs for Windows XP hardware. A search on eBay for laptops with Windows XP shows a huge number of laptops for less than $300 – some as low as $120. These were laptops that presumably once sold for $1200 or $1800 or better. If we assume that a $300 laptop once sold for $1800, that is an 83% reduction in price from original retail – $1500 that stays in your pocket. New laptops with Windows 7 start at $350 or so for minimal systems; for a full-power system with Windows 7 it could be well over $1000.

The software itself is cheaper. Again, on eBay one can find Windows XP SP2 for $30-$40 whereas Windows 7 Ultimate is $75 and up – a savings of over %50.

Lastly, why buy Windows 7 now at retail prices when you can wait for Windows 8 – and get Windows 7 at fire-sale prices for hardware that by then will have lost 80% of its value. Just by waiting you can save thousands of dollars.

There is also the fact that a lot of software may not yet fully support Windows 7, and the software you count on the most may run only on Windows XP.

So now – that’s why you should stick with Windows XP (just remember to properly secure it!). Let everyone else spend their thousands of dollars and you can get their old equipment for a fraction of its original cost.

However, for an enterprise, the reasoning would be different – and the results might be different.


Get every new post delivered to your Inbox.

Join 43 other followers