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 http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm
yum install R R-devel

Then I downloaded rpy and extracted it:

curl http://rpy.svn.sourceforge.net/viewvc/rpy/trunk/rpy/?view=tar > rpy.tar.gz
tar xvzf rpy.tar.gz
cd rpy
python setup.py install

Lo and behold, it imports without error:

python -c "import rpy"

Yay!

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 http://pypi.python.org/packages/source/r/rpy2/rpy2-2.2.0.tar.gz#md5=a42a7f1e6ddb10dc3a1886c2f4309fab > rpy2-2.2.0.tar.gz
tar xvzf rpy2-2.2.0.tar.gz
cd rpy2-2.2.0
python setup.py 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() [function.call-user-func-array]: First argument is expected to be a valid callback, 'nodereference_autocomplete_access' was given in /var/www/html/drupal/includes/menu.inc 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 apache@www.example.com (through a relay at mail.example.com) 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 apache@www.example.com was not getting delivered, even though in /etc/aliases on mail.example.com clearly had the entries

apache: root
root: myemailaddress@mydomain.com

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/main.cf.

Before:

mailbox_transport = cyrus

After:

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.

Topic: 

Pages

Subscribe to SysArchitects RSS