- 论坛徽章:
- 0
|
R 是一个用于统计计算的成熟的开源软件,功能强大。
R 是一种为统计计算和图形显示
而设计的语言及环境。
1,解压
bash-3.00$ gzip -dc R-2.5.1.tar.gz |tar xvf -
bash-3.00$ cd R-2.5.1
2,配置
bash-3.00$ ./configure
这一步出了问题,首先是提示没有readline库,其实系统里是有的,可能是配置程序找不到,或版本问题。
到http://www.sunfreeware.com/下载了装好之后再次
bash-3.00$ ./configure
还是不通过,提示:
configure: error: --with-iconv=yes (default) and a suitable iconv is not available
google到了一个解决方案,这一次configure通过了.
bash-3.00$ ./configure --without-iconv
3,编译
bash-3.00$ make
.......
未定义 文件中的
符号 在文件中
__builtin_isnan arithmetic.o
ld: 致命的: 符号参照错误. 没有输出被写入R.bin
collect2: ld returned 1 exit status
......
又出问题啦,arithmetic.c等文件中查找不到__builtin_isnan关键字,google一下说是
This has come up several times, all with long obselete versions of gcc.
R does not use __builtin_isnan, but gcc does in its own (rather than
Solaris') header files. So it is an issue with the compiler, and note
that 3.4.2 is an old (Sept 2004) version of the compiler.
原来是gcc自己的问题(与R无关),版本太老.我系统上的是 3.4.3.
等有时间更新一下gcc再试试看。
其实R可以从http://www.sunfreeware.com/下载已编译好的二进制包来安装。
相关知识:
1,readline
The Readline library provides a set of functions
for use by applications that allow users to edit command lines as they
are typed in. Both Emacs and vi editing modes are available. The
Readline library includes additional functions to maintain a list of
previously-entered command lines, to recall and perhaps reedit those
lines, and perform csh-like history expansion on previous commands.
2,iconv(简单的说就是字体编码转换库)
For historical reasons, international text is often encoded using a
language or country dependent character encoding. With the advent of the
internet and the frequent exchange of text across countries - even the
viewing of a web page from a foreign country is a "text exchange" in this
context -, conversions between these encodings have become important.
They have also become a problem, because many characters which are present
in one encoding are absent in many other encodings. To solve this mess,
the Unicode encoding has been created. It is a super-encoding of all others
and is therefore the default encoding for new text formats like XML.
Still, many computers still operate in locale with a traditional (limited)
character encoding. Some programs, like mailers and web browsers, must
be able to convert between a given text encoding and the user's encoding.
Other programs internally store strings in Unicode, to facilitate internal
processing, and need to convert between internal string representation
(Unicode) and external string representation (a traditional encoding)
when they are doing I/O. GNU libiconv is a conversion library for both
kinds of applications.
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/46984/showart_382840.html |
|