整理日期:2014年4月17日
1 将configure文件转换为UTF8格式
2 #./configure
configure: error: cannot run /bin/sh config/config.sub
#rpm -qa | grep libtool
libtool-ltdl-2.2.6-15.5.el6.x86_64
libtool-ltdl 已安装了
libtool
libtool-ltdl-devel
这两个安装了没有,
如没有就可以吧!
yum -y install libtool-ltdl libtool-ltdl-devel
除了缺少libtool之外,还有可能是换行符的问题
# sed -i ‘s/\r$//’ configure
下载:http://rpm.pbone.net/index.php3/stat/4/idpl/15990892/dir/scientific_linux_6/com/libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm.html
下载:http://rpm.pbone.net/index.php3/stat/4/idpl/21920024/dir/redhat_el_6/com/libtool-2.2.6-16.6.x86_64.rpm.html
#rpm -ivh libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm
#rpm -ivh libtool-2.2.6-16.6.x86_64.rpm
warning: libtool-2.2.6-16.6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID d91ca522: NOKEY
error: Failed dependencies:
autoconf >= 2.58 is needed by libtool-2.2.6-16.6.x86_64
automake >= 1.4 is needed by libtool-2.2.6-16.6.x86_64
下载:http://rpm.pbone.net/index.php3/stat/4/idpl/14954015/dir/redhat_el_3/com/autoconf-2.59-5_11.el3.at.noarch.rpm.html
#rpm -ivh autoconf-2.59-5_11.el3.at.noarch.rpm
下载:ftp://ftp.sunet.se/pub/Linux/distributions/redhat/redhat-archive/redhat/linux/6.0/en/os/sparc/RedHat/RPMS/automake-1.4-4.noarch.rpm
#rpm -ivh automake-1.4-4.noarch.rpm
重新安装:rpm -ivh libtool-2.2.6-16.6.x86_64.rpm
#sed -i ‘s/\rKaTeX parse error: Expected 'EOF', got '#' at position 22: …ild/config.sub #̲sed -i 's/\r//’ build/config.guess
#./configure
configure: error: C++ preprocessor “/lib/cpp” fails sanity check
解决办法:出现该情况是由于c++编译器的相关package没有安装,
下载:http://rpm.pbone.net/index.php3/stat/4/idpl/15988835/dir/scientific_linux_6/com/gcc-c+±4.4.4-13.el6.x86_64.rpm.html
#rpm -ivh gcc-c+±4.4.4-13.el6.x86_64.rpm
下载:http://rpm.pbone.net/index.php3/stat/4/idpl/15990835/dir/scientific_linux_6/com/libstdc+±devel-4.4.4-13.el6.x86_64.rpm.html
#rpm -ivh libstdc+±devel-4.4.4-13.el6.x86_64.rpm
#rpm -qa | grep gcc
3 #make
libtool: Version mismatch error. This is libtool 2.2.6b
#rpm -qa | grep libtool
下载:http://rpm.pbone.net/index.php3/stat/4/idpl/21715225/dir/fedora_8/com/libtool-ltdl-2.2.6b-37.1.x86_64.rpm.html
#rpm -e libtool-ltdl
#rpm -ivh libtool-ltdl-2.2.6b-37.1.x86_64.rpm
下载:http://rpm.pbone.net/index.php3/stat/4/idpl/21715226/dir/fedora_8/com/libtool-ltdl-devel-2.2.6b-37.1.x86_64.rpm.html
#rpm -ivh libtool-ltdl-devel-2.2.6b-37.1.x86_64.rpm
下载:http://rpm.pbone.net/index.php3/stat/4/idpl/21715221/dir/fedora_8/com/libtool-2.2.6b-37.1.x86_64.rpm.html
#rpm -ivh libtool-2.2.6b-37.1.x86_64.rpm
下载:http://rpm.pbone.net/index.php3/stat/4/idpl/18865918/dir/fedora_10/com/automake-1.10.1-2.noarch.rpm.html
#rpm -ivh automake-1.10.1-2.noarch.rpm
下载:http://rpm.pbone.net/index.php3/stat/4/idpl/8445697/dir/turbolinux/com/autoconf-2.60-1.noarch.rpm.html
#rpm -ivh autoconf-2.60-1.noarch.rpm
下载:http://rpm.pbone.net/index.php3/stat/4/idpl/19920334/dir/centos_5/com/gcc-4.1.2-54.el5.x86_64.rpm.html
#rpm -ivh gcc-4.1.2-54.el5.x86_64.rpm
下载:http://rpm.pbone.net/index.php3/stat/4/idpl/19919988/dir/centos_5/com/cpp-4.1.2-54.el5.x86_64.rpm.html
#rpm -ivh cpp-4.1.2-54.el5.x86_64.rpm
#sed -i ‘s/\r$//’ /home/liaowj/apr-0.9.4/build/get-version.sh
#sed -i ‘s/\r$//’ configure.in
原来保留在机器上的源码很难解决编译问题,怎么试都是失败,到此以上三个步骤都行不通,选择重新下载新的apr-0.9.4源码
4 apr-0.9.4
下载:http://rpm.pbone.net/index.php3?stat=26&dist=42&size=1071818&name=apr-0.9.4-26.el4.src.rpm
#rpm -ivh apr-0.9.4-26.el4.src.rpm
安装后的路径如下:
#cd /root/rpmbuild/SOURCES/apr-0.9.4
4.1. 编译时发现还需要libtool包:
下载:http://rpm.pbone.net/index.php3?stat=26&dist=42&size=101425&name=apr-0.9.4-26.el4.x86_64.rpm
#rpm -ivh apr-0.9.4-26.el4.x86_64.rpm
下载:http://rpm.pbone.net/index.php3?stat=26&dist=74&size=44652&name=libtool-ltdl-2.2.6-16.6.x86_64.rpm
#rpm -ivh libtool-ltdl-2.2.6-16.6.x86_64.rpm
下载:http://rpm.pbone.net/index.php3?stat=26&dist=74&size=165444&name=libtool-ltdl-devel-2.2.6-16.6.x86_64.rpm
#rpm -ivh libtool-ltdl-devel-2.2.6-16.6.x86_64.rpm
4.2. 编译时出现STCP_NODELAY未定义,自己加了#define STCP_NODELAY 1 后编译通过
下载:http://rpm.pbone.net/index.php3?stat=26&dist=52&size=37133&name=telnet-server-0.17-41.el5.x86_64.rpm
#rpm -ivh telnet-server-0.17-41.el5.x86_64.rpm
下载:http://rpm.pbone.net/index.php3/stat/4/idpl/20283911/dir/scientific_linux_6/com/xinetd-2.3.14-38.el6.x86_64.rpm.html
#rpm -ivh xinetd-2.3.14-38.el6.x86_64.rpm
下载:http://rpm.pbone.net/index.php3/stat/4/idpl/12261261/dir/turbolinux/com/telnet-client-0.17-30.x86_64.rpm.html
#rpm -ivh telnet-client-0.17-30.x86_64.rpm
下载:http://rpm.pbone.net/index.php3/stat/4/idpl/13949379/dir/redhat_el_3/com/libstdc+±3.2.3-58.x86_64.rpm.html
#rpm -ivh libstdc+±3.2.3-58.x86_64.rpm
telnet不上10.10.0.112
查看一下/etc/pam.d/下的文件是否有telnet,没有的话是被系统视为不安全的服务选项,是不符合pam模块安全认证的。所以telnet无法实现链接的功能。ssh就可以,因为ssh服务在/etc/pam.d/下,服务程序是sshd
[root@onion pam.d]# pwd
/etc/pam.d
[root@onion pam.d]# ls -l ssh*
-rw-r–r--. 1 root root 575 Jun 22 2012 sshd
-rw-r–r--. 1 root root 341 Jun 22 2012 ssh-keycat
经过分析,不是这个原因
终于找到问题,这里不能用INT:
INT iSendByte; //在64位下是4字节,但apr_size_t在64位下是8字节,导致地址转换获取是有问题的,必须改为:
apr_size_t iSendByte;
rv = apr_socket_send(pcd->pSocket, szBuf, (apr_size_t *)&iSendByte);
店铺地址:https://shop66907778.taobao.com/