Installing rpy and rpy2 on RHEL6

I wanted to install rpy and rpy2 on Red Hat Enterprise Linux 6. Here's how I did it. There have been several fixes in the rpy SVN repository that have not shown up in the version downloadable from SourceForge. Hopefully that's been fixed by now, but here's how I installed it by retrieving rpy directly from the repository.

First I made sure that the python-devel package was installed to avoid the error src/RPy.h:63:20: error: Python.h: No such file or directory:

yum install python-devel

Then I installed R and R-devel from EPEL:

rpm -Uvh
yum install R R-devel

Then I downloaded rpy and extracted it:

curl > rpy.tar.gz
tar xvzf rpy.tar.gz
cd rpy
python install

Lo and behold, it imports without error:

python -c "import rpy"


Besides R and R-devel, rpy2 requires that the readline-devel package be installed, otherwise installation fails with ./rpy/rinterface/_rinterface.c:79:31: error: readline/readline.h: No such file or directory.

yum install readline-devel

After that, rpy2 installs easily:

curl > rpy2-2.2.0.tar.gz
tar xvzf rpy2-2.2.0.tar.gz
cd rpy2-2.2.0
python install

Solution to nodereference_autocomplete_access error

We recently rolled out a site to testing and got a mysterious error:

warning: call_user_func_array() []: First argument is expected to be a valid callback, 'nodereference_autocomplete_access' was given in /var/www/html/drupal/includes/ on line 453.

We were using Acquia Drupal, so the nodereference module was right where one would expect. What was Drupal's problem?

Turned out to be totally unrelated. The developer had missed checking Drupal's .htaccess file into the repository, so this copy of Drupal was missing its .htaccess file, and all sorts of havoc (including the message above) resulted. The tip was when clicking on the login form resulted in a 404 Page Not Found, which led to the realization that clean URLs weren't working, which pointed the big fat Drupal finger directly at .htaccess problems.

Adding threads support to perl built by MacPorts

I had installed perl5.12 from MacPorts. sudo port installed listed

perl5                          @5.12.3         lang/perl5
perl5.12                       @5.12.3         lang/perl5.12
perl5.8                        @5.8.9          lang/perl5.8

To enable threading support, I used

sudo port upgrade --enforce-variants perl5.12 +threads

Mail Forwarding on OS X Server 10.5 Leopard: Using /etc/aliases

I like to have my mailserver set up so that mail sent to (through a relay at comes to one of my email addresses.

On my old crufty Mac OS X Server mailserver, which runs postfix, I was wondering why mail sent to was not getting delivered, even though in /etc/aliases on clearly had the entries

apache: root

Instead, I was receiving errors like relay=cyrus, delay=0.13, delays=0.02/0.02/0/0.09, dsn=4.3.0, status=deferred (temporary failure. Command output: couldn't connect to lmtpd: No such file or directory_ 421 4.3.0 deliver: couldn't connect to lmtpd_

I was able to fix this by changing the relay from cyrus to local. That was OK since I am not using cyrus anyway; I have no local accounts on the mailserver.

I made the change by clicking a checkbox called "Deliver to "/var/mail" when POP & IMAP are disabled" in the OS X Server GUI.

The change has the effect of changing a line in /etc/postfix/


mailbox_transport = cyrus


mailbox_transport =

Postfix will now use the local transport, which actually checks /etc/aliases and delivers accordingly.

And yes, this is my last OS X Server and it's on the list to be migrated to RHEL.



Subscribe to SysArchitects RSS