zlib/bz2 library and headers are requried for compiling R

≡放荡痞女 提交于 2019-12-01 17:08:24

After looking at the parts of configure script checking the library versions, it seems that it compares versions with strcmp or strncmp. Since "1.2.11" is lexicographically smaller that "1.2.6" it return a non-zero value indicating that the match failed. Besides, it just compares the first 5 characters which is also not what it is intented. So, it's a bug in configure script. Changing the script fixed the issue.

For zlib, find this line:

exit(strncmp(ZLIB_VERSION, "1.2.5", 5) < 0);

Change it to:

exit(ZLIB_VERNUM < 0x1250);

I had some issues installing R myself, specifically with the error

checking for BZ2_bzlibVersion in -lbz2... no

I had to install libbz2-dev to get that error to go away.

Unfortunately, I came across a few more issues while running ./configure and had to do a little more digging to find out how to solve it.

Discussion on issue

After reading that, I had realized I had to install a couple packages like libcurl4-openssl-dev, libpcre3, and liblzma-dev to finally finish the configuration.

The cited link suggested

At this stage you could have as well tried to install R 3.2.0RC ... R-devel has not yet diverged much.

Personally, I think that installing an older version to resolve dependency issues reeks of laziness, but that's just my two cents.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!