marcschwartz / WriteXLS

CRAN Package WriteXLS: Cross-platform Perl based R function to create Excel 2003 (XLS) and Excel 2007 (XLSX) files from one or more data frames. Each data frame will be written to a separate named worksheet in the Excel spreadsheet. The worksheet name will be the name of the data frame it contains or can be specified by the user.
GNU General Public License v2.0
19 stars 9 forks source link

testPerl() returns no errors, but perl binaries are mismatched #17

Closed diazdc closed 5 years ago

diazdc commented 5 years ago

Good day,

I'm running R (3.6.1) and WriteXLS in a conda environment on CentOS7 and I receive the following error:

ListUtil.c: loadable library and perl binaries are mismatched (got handshake key 
0xdb80080, needed 0xde00080)
The Perl script 'WriteXLSX.pl' failed to run successfully.

However, if I run testPerl() I get

Perl found.

All required Perl modules were found.

I've installed perl v5.26.2 via conda. .libPaths() points to /miniconda3/envs/R-env/bin/perl and my perl installation is located at/miniconda3/envs/R-env/bin/perl, so I assume my paths are in order and the correct version of perl is called. Please let me know if there is something I am missing.

Cheers,

Daniel

marcschwartz commented 5 years ago

Hi,

Thanks for your post.

Based upon a Google search of the messages you are getting, it sounds like either a broken Perl installation, or a mis-match between a default Perl installation and additional modules installed from a different source.

I found a StackOverflow discussion here:

https://stackoverflow.com/a/51186495/180275

that might be helpful to you. If not, you may want to post the information to a Perl forum for other guidance that may be helpful to resolve the issue.

Please post back, once you have a solution, so that it may be of benefit to others with a similar issue.

Thanks!

diazdc commented 5 years ago

Thanks for the link to the stackoverflow thread; it clued me into a fix. I was able to solve this by setting my perl environment variable to the conda path where the perl binaries are located. It turns out that an older version of perl was called from the environment variable set by my institution. For anyone else who might stumble across the same problem, here's what I added to my .bash_profile:

export PERL5LIB=/home/user/miniconda3/envs/R-env/bin/perl