[关闭]
@Gebitang 2015-01-13T14:39:39.000000Z 字数 43227 阅读 3409

RedHat Server服务器环境部署

linux redhat


本文环境位64位RedHat 6.3系统


rpm管理时提示Permission deny

需要su到root用户进行管理


测试服务器环境部署


JAVA环境(自带)


安装SDK

  1. [gebitang@js ~]$ scp agentone@192.168.113.34:/home/agentone/android-sdk-linux.tar.gz ./
  2. [gebitang@js ~]$ tar zxvf android-sdk-linux.tar.gz
  3. [gebitang@js ~]$ sudo mv ./android-sdk-linux /usr/share/

配置环境变量

append the following code to /etc/profile

  1. PATH=$PATH:/usr/share/android-sdk-linux/platform-tools:/usr/share/android-sdk-linux/tools
  2. export PATH

make it work right now: source /etc/profile


部署TA程序

  1. scp agentone@192.168.113.34:/home/agentone/Desktop/TA.tar.gz ./
  2. tar zvxf TA.tar.gz

复制监控所需lib库

  1. mkdir sigar
  2. cd sigar
  3. scp agentone@192.168.100.188:/home/agentone/sigar.tar ./
  4. tar xvf sigar.tar
  5. rm sigar.tar
  6. ls -al /usr/lib |wc -l
  7. sudo mv ./* /usr/lib
  8. sudo mv .sigar_shellrc /usr/lib
  9. ls -al /usr/lib |wc -l
  10. ls -al /usr/lib |grep sigar|wc -l
  11. #23 files

添加随机自启动

append your script to /etc/rc.d/rc.local,

  1. #start adb server
  2. sudo killall adb
  3. cd /usr/share/android-sdk-linux/platform-tools
  4. ./adb start-server
  5. #run TestAgent jar file
  6. /home/agentone/Desktop/TA/runTA.sh


YUM配置

由于 redhat的yum在线更新是收费的,如果没有注册的话不能使用,如果要使用,需将redhat的yum卸载后,重新安装,再配置其他源.来源文章一文章二。以下环境为64位
自带的yum相关rpm包:

[agentone@testagent ~]$ rpm -aq |grep yum
PackageKit-yum-0.5.8-20.el6.x86_64
yum-metadata-parser-1.1.2-16.el6.x86_64
yum-utils-1.1.30-14.el6.noarch
yum-3.2.29-30.el6.noarch
yum-rhn-plugin-0.9.1-40.el6.noarch
PackageKit-yum-plugin-0.5.8-20.el6.x86_64
yum-plugin-security-1.1.30-14.el6.noarch


删除redhat原有的yum

rpm -aq | grep yum | xargs rpm -e --nodeps 

下载yum安装文件

注意,如果下载时找不到文件,就登录到:http://mirrors.163.com/centos/6/os/x86_64/ 上查找相应的文件。然后再下载。

  1. wget http://tel.mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpm
  2. wget http://tel.mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
  3. wget http://tel.mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
  4. wget http://tel.mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm

进行安装yum

  1. rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
  2. rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
  3. rpm -ivh yum-3.2.29-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

注意最后两个包必需同时安装,否则会相互依赖


配置源

可以先将旧的做备份 mv /etc/yum.repos.d/rhel-source.repo /etc/yum.repos.d/rhel-source.repo.bak
新建/etc/yum.repos.d/CentOS6-Base-163.repo
内容如下:

  1. [base]
  2. name=CentOS-6 - Base - 163.com
  3. baseurl=http://mirrors.163.com/centos/6/os/$basearch/
  4. #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
  5. gpgcheck=1
  6. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
  7. priority=1
  8. #released updates
  9. [updates]
  10. name=CentOS-6 - Updates - 163.com
  11. baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
  12. #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
  13. gpgcheck=1
  14. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
  15. priority=1
  16. #additional packages that may be useful
  17. [extras]
  18. name=CentOS-6 - Extras - 163.com
  19. baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
  20. #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras
  21. gpgcheck=1
  22. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
  23. priority=1
  24. #additional packages that extend functionality of existing packages
  25. [centosplus]
  26. name=CentOS-6 - Plus - 163.com
  27. baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
  28. #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus
  29. gpgcheck=1
  30. enabled=0
  31. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
  32. priority=2
  33. #contrib - packages by Centos Users
  34. [contrib]
  35. name=CentOS-6 - Contrib - 163.com
  36. baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/
  37. #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib
  38. gpgcheck=1
  39. enabled=1
  40. gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
  41. priority=1

yum clean all

Loaded plugins: fastestmirror, product-id, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Cleaning repos: base contrib extras updates
Cleaning up Everything


yum install vim #测试一下可不可以用

Loaded plugins: fastestmirror, product-id, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Determining fastest mirrors
base | 3.7 kB 00:00
base/primary_db | 4.4 MB 01:24
contrib | 2.9 kB 00:00
contrib/primary_db | 1.2 kB 00:00
extras | 3.4 kB 00:00
extras/primary_db | 19 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 3.7 MB 00:45
Setting up Install Process
Package 2:vim-enhanced-7.2.411-1.8.el6.x86_64 already installed and latest version
Nothing to do



JAVA更新

由于Redhat Enterprise Linux 6.3 中自带安装了OpenJDK1.6(事实上只是jre?)。

查看已经安装的JAVA目录

ls -l | more #查看文件属性。D开头文件夹;l开头表示link;-开头文件
/usr/bin 目录下,file java查看link的目录


卸载jdk

执行yum remove java 需要root权限,或以root身份操作
终端显示 Is this ok [y/N]:
输入y ,按回车。
终端显示 Complete! 此时java-1.6.0-openjdk.x86_64 1:1.6.0.0-1.45.1.11.1.el6 已被卸了。


安装jdk1.6

直接从官网主页不好找,这是历史版本综合页面:JavaArchive
1.下载:jdk-6u45-linux-x64-rpm.bin 地址

2.给文件加上可执行权限,目录为/usr/java

[root@gebitang java]# chmod +x jdk-6u45-linux-x64-rpm.bin

3.执行jdk-1_5_0_06-linux-i586-rpm.bin

[root@gebitang java]# ./jdk-6u45-linux-x64-rpm.bin

安装到当前目录,对应的JAVA_HOME可以设置为export JAVA_HOME=/usr/java/jdk1.6.0_45



防火墙应用

在Server版本下,需要用到的端口都需要在/etc/sysconfig/iptables下进行配置,否则一般的应用程序无法进行访问。

mysql数据库的3306

vsftpd的22端口

ControlServer指定的端口



mysql数据库

资料文章


安装mysql

yum install mysql-server 自动安装log如下:

  1. [root@testagent yum.repos.d]# yum install mysql-server
  2. Loaded plugins: fastestmirror, product-id, subscription-manager
  3. Updating certificate-based repositories.
  4. Unable to read consumer identity
  5. Loading mirror speeds from cached hostfile
  6. Setting up Install Process
  7. Resolving Dependencies
  8. --> Running transaction check
  9. ---> Package mysql-server.x86_64 0:5.1.73-3.el6_5 will be installed
  10. --> Processing Dependency: mysql = 5.1.73-3.el6_5 for package: mysql-server-5.1.73-3.el6_5.x86_64
  11. --> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.73-3.el6_5.x86_64
  12. --> Processing Dependency: libssl.so.10(libssl.so.10)(64bit) for package: mysql-server-5.1.73-3.el6_5.x86_64
  13. --> Processing Dependency: libcrypto.so.10(libcrypto.so.10)(64bit) for package: mysql-server-5.1.73-3.el6_5.x86_64
  14. --> Running transaction check
  15. ---> Package mysql.x86_64 0:5.1.73-3.el6_5 will be installed
  16. --> Processing Dependency: mysql-libs = 5.1.73-3.el6_5 for package: mysql-5.1.73-3.el6_5.x86_64
  17. ---> Package openssl.x86_64 0:1.0.0-20.el6_2.5 will be updated
  18. ---> Package openssl.x86_64 0:1.0.1e-16.el6_5.14 will be an update
  19. ---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
  20. --> Running transaction check
  21. ---> Package mysql-libs.x86_64 0:5.1.61-4.el6 will be updated
  22. ---> Package mysql-libs.x86_64 0:5.1.73-3.el6_5 will be an update
  23. --> Finished Dependency Resolution
  24. Dependencies Resolved
  25. ================================================================================
  26. Package Arch Version Repository Size
  27. ================================================================================
  28. Installing:
  29. mysql-server x86_64 5.1.73-3.el6_5 updates 8.6 M
  30. Installing for dependencies:
  31. mysql x86_64 5.1.73-3.el6_5 updates 894 k
  32. perl-DBD-MySQL x86_64 4.013-3.el6 base 134 k
  33. Updating for dependencies:
  34. mysql-libs x86_64 5.1.73-3.el6_5 updates 1.2 M
  35. openssl x86_64 1.0.1e-16.el6_5.14 updates 1.5 M
  36. Transaction Summary
  37. ================================================================================
  38. Install 3 Package(s)
  39. Upgrade 2 Package(s)
  40. Total download size: 12 M
  41. Is this ok [y/N]: y
  42. Downloading Packages:
  43. (1/5): mysql-5.1.73-3.el6_5.x86_64.rpm | 894 kB 00:21
  44. (2/5): mysql-libs-5.1.73-3.el6_5.x86_64.rpm | 1.2 MB 00:25
  45. (3/5): mysql-server-5.1.73-3.el6_5.x86_64.rpm | 8.6 MB 00:46
  46. (4/5): openssl-1.0.1e-16.el6_5.14.x86_64.rpm | 1.5 MB 00:12
  47. (5/5): perl-DBD-MySQL-4.013-3.el6.x86_64.rpm | 134 kB 00:01
  48. --------------------------------------------------------------------------------
  49. Total 116 kB/s | 12 MB 01:49
  50. warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
  51. Retrieving key from http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
  52. Importing GPG key 0xC105B9DE:
  53. Userid: "CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>"
  54. From : http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
  55. Is this ok [y/N]: y
  56. Running rpm_check_debug
  57. Running Transaction Test
  58. Transaction Test Succeeded
  59. Running Transaction
  60. Warning: RPMDB altered outside of yum.
  61. ** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows:
  62. PackageKit-0.5.8-20.el6.x86_64 has missing requires of PackageKit-yum = ('0', '0.5.8', '20.el6')
  63. PackageKit-0.5.8-20.el6.x86_64 has missing requires of PackageKit-yum-plugin = ('0', '0.5.8', '20.el6')
  64. rhn-check-1.0.0-87.el6.noarch has missing requires of yum-rhn-plugin >= ('0', '0.9.1', '35')
  65. Updating : openssl-1.0.1e-16.el6_5.14.x86_64 1/7
  66. Updating : mysql-libs-5.1.73-3.el6_5.x86_64 2/7
  67. Installing : perl-DBD-MySQL-4.013-3.el6.x86_64 3/7
  68. Installing : mysql-5.1.73-3.el6_5.x86_64 4/7
  69. Installing : mysql-server-5.1.73-3.el6_5.x86_64 5/7
  70. Cleanup : mysql-libs-5.1.61-4.el6.x86_64 6/7
  71. Cleanup : openssl-1.0.0-20.el6_2.5.x86_64 7/7
  72. Installed products updated.
  73. Verifying : perl-DBD-MySQL-4.013-3.el6.x86_64 1/7
  74. Verifying : mysql-libs-5.1.73-3.el6_5.x86_64 2/7
  75. Verifying : mysql-server-5.1.73-3.el6_5.x86_64 3/7
  76. Verifying : mysql-5.1.73-3.el6_5.x86_64 4/7
  77. Verifying : openssl-1.0.1e-16.el6_5.14.x86_64 5/7
  78. Verifying : mysql-libs-5.1.61-4.el6.x86_64 6/7
  79. Verifying : openssl-1.0.0-20.el6_2.5.x86_64 7/7
  80. Installed:
  81. mysql-server.x86_64 0:5.1.73-3.el6_5
  82. Dependency Installed:
  83. mysql.x86_64 0:5.1.73-3.el6_5 perl-DBD-MySQL.x86_64 0:4.013-3.el6
  84. Dependency Updated:
  85. mysql-libs.x86_64 0:5.1.73-3.el6_5 openssl.x86_64 0:1.0.1e-16.el6_5.14
  86. Complete!
  87. [root@testagent yum.repos.d]#

配置mysql

默认的/etc/my.conf文件内容有限,可以先进行备份,然后在/usr/share/mysql/下找到*.cnf文件,拷贝其中一个到/etc/并改名为 my.cnf)中。命令如下:cp /usr/share/mysql/my-medium.cnf /etc/my.cnf


启动mysql

/etc/init.d/mysqld start初次启动log:

  1. [root@testagent etc]# /etc/init.d/mysqld start
  2. 初始化 MySQL 数据库: WARNING: The host 'testagent' could not be looked up with resolveip.
  3. This probably means that your libc libraries are not 100 % compatible
  4. with this binary MySQL version. The MySQL daemon, mysqld, should work
  5. normally with the exception that host name resolving will not work.
  6. This means that you should use IP addresses instead of hostnames
  7. when specifying MySQL privileges !
  8. Installing MySQL system tables...
  9. 140626 16:12:54 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
  10. 140626 16:12:54 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
  11. OK
  12. Filling help tables...
  13. 140626 16:12:55 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
  14. 140626 16:12:55 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
  15. OK
  16. To start mysqld at boot time you have to copy
  17. support-files/mysql.server to the right place for your system
  18. PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
  19. To do so, start the server, then issue the following commands:
  20. /usr/bin/mysqladmin -u root password 'new-password'
  21. /usr/bin/mysqladmin -u root -h testagent password 'new-password'
  22. Alternatively you can run:
  23. /usr/bin/mysql_secure_installation
  24. which will also give you the option of removing the test
  25. databases and anonymous user created by default. This is
  26. strongly recommended for production servers.
  27. See the manual for more instructions.
  28. You can start the MySQL daemon with:
  29. cd /usr ; /usr/bin/mysqld_safe &
  30. You can test the MySQL daemon with mysql-test-run.pl
  31. cd /usr/mysql-test ; perl mysql-test-run.pl
  32. Please report any problems with the /usr/bin/mysqlbug script!
  33. [确定]
  34. 正在启动 mysqld [确定]
  35. [root@testagent etc]#

初始化root密码

三种方式:
a). mysql默认root用户没有密码,输入mysql –u root 进入mysql
使用use mysql;
更改密码update user set password=PASSWORD('123456') where User='root';
退出exit;
重启mysql生效。root权限执行/etc/init.d/mysqld restart

  1. [agentone@testagent mysql]$ mysql -u root -p
  2. Enter password:
  3. Welcome to the MySQL monitor. Commands end with ; or \g.
  4. Your MySQL connection id is 13
  5. Server version: 5.1.73-log Source distribution
  6. Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  7. Oracle is a registered trademark of Oracle Corporation and/or its
  8. affiliates. Other names may be trademarks of their respective
  9. owners.
  10. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  11. mysql> use mysql;
  12. Database changed
  13. mysql> update user set password=PASSWORD('123456') where User='root';
  14. Query OK, 3 rows affected (0.00 sec)
  15. Rows matched: 3 Changed: 3 Warnings: 0
  16. mysql> exit;
  17. Bye

b). 或者按照初次启动的提示执行:

  1. /usr/bin/mysqladmin -u root password 'new-password'
  2. /usr/bin/mysqladmin -u root -h testagent password 'new-password'

c). 或者启动之后,执行/usr/bin/mysql_secure_installation


允许mysql远程访问

  1. mysql -u root p
  2. mysql>use mysql;
  3. mysql>update user set host = '%' where user = 'root';
  4. mysql>exit;

安装MySQL-python

yum install MySQL-python注意大小写
验证:进入python环境,import MySQLdb无错误即表示成功。
用来支持python连接数据库


允许Java程序访问,防火墙支持

/etc/sysconfig/iptables里面添加规则:

  1. vi /etc/sysconfig/iptables
  2. -I INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
  3. -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT

然后重启iptables service iptables restart/etc/init.d/iptables restart



安装vsftpd

yum install vsftpd


配置vi /etc/vsftpd/vsftpd.conf

设置如下内容:

listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES #有可能没有这个参数
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
ftpd_banner=Welcome to XXX FTP service.
chroot_local_user=YES


配置root用户可以登录

设置系统root用户的密码;
编辑文件vi /etc/vsftpd/ftpusers 注销其中的root
编辑文件vi /etc/vsftpd/user_list 注销其中的root(如果/etc/vsftpd/vsftpd.conf文件中的userlist_enable=YES(这也是默认情况下的设置),那么在/etc/vsftpd.user_list文件中列出的用户就不能使用ftp。)
重启服务/etc/init.d/vsftpd restart


更改用户目录

修改root用户的目录vi /etc/passwd

root:x:0:0:root:/usr/share/tomcat/webapps/ROOT/users:/bin/bash


配置防火墙支持

资料参考:端口支持
/etc/sysconfig/iptables-config里面添加ip_nat_ftp ip_conntrack_ftp模块,如下:

  1. vi /etc/sysconfig/iptables-config
  2. IPTABLES_MODULES="ip_nat_ftp"
  3. IPTABLES_MODULES="ip_conntrack_ftp"

在iptables里添加规则:

  1. vi /etc/sysconfig/iptables
  2. -I INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
  3. -A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT

然后重启iptables service iptables restart/etc/init.d/iptables restart


解决无法上传文件问题

关闭selinux,将/etc/selinux/config文件中SELINUX值修改为SELINUX=disabled
然后执行setenforce 0 或者重启。解决上传问题。
或者根据man ftpd_selinux中的参数进行更为细致的配置



Tomcat搭建

解压安装tar包

tar zxvf apache-tomcat-7.0.54.tar.gz


配置端口80

vi /usr/share/tomcat/conf/server.xml 修改Connector 端口位80


外部访问显示空白页--防火墙配置

Tomcat正常启动,catalina.outlog里面没有报错
确定本地可以访问curl http://localhost,是否返回页面html代码。curl用法
在本地可以访问,外部无法访问是由于防火墙的原因。端口没有对外开放。
修改防火墙:vi /etc/sysconfig/iptables
则在iptables文件中加入:-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
然后重启iptables服务:service iptables restart
最后重启tomcat服务即可


配置tool.jar文件

将jdk的lib目录下tools.jar包拷贝到tomcat的lib文件夹下


启动提示APR相关错误(可忽略)

解决方法:资料

The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib

需要APR libraryOpenSSL libraries
openssl 可以用 yum install openssl-devel,apr还是下载*.gz来安装。 下载页面
涉及到apr, apr-util, tomcat-native三个包。
tomcat-native.tar.gz 可以在tomcat/bin目录下找到。
apr-util编译时需要用到 --with-apr参数
./configure --with-apr=/usr/local/apr
tomcat-native包编译时需要参数:./configure --with-apr=/usr/local/apr --with-java-home=/usr/java/jdk1.6.0_11

启动提示内存溢出

java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: PermGen spa
ce
参考资料
* Create a setenv.sh manually, and put it into the ${tomcat-folder}\bin\ folder.
export JAVA_OPTS="-Dfile.encoding=UTF-8 -Xms128m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=256m"
P.S With double quotes, export JAVA_OPTS=”{value}”.
* Restart tomcat


修改启动的环境变量

可以在上述文件中添加环境变量



配置Android SDK

配置Android环境

参考linux中配置android sdk

下载SDK,下载地址:http://developer.android.com/sdk/index.html,选择Linux(i386)。因为SDK只有32位的,如果装的是64位系统,则要安装ia32-libs(32位的兼容库),运行32位程序。安装命令:sudo apt-get install ia32-libs(在Ubuntu中的命令)。下载完成后解压,在终端进入到SDK的根目录,然后执行:tools/android update sdk –no-ui即可开始和windows里面一样的更新。

或利用已有的压缩包

新建tar包,将/usr/share/目录下的android-sdk-linux文件压缩到tar包,并使用gzip再次压缩:sudo tar czf android-sdk-linux.tar.gz android-sdk-linux/*

解压 tar zxvf android-sdk
然后移动到/usr/share目录下 sudo mv ./android-sdk-linux /usr/share


adb命令报错

执行adb devices依次遇到下列问题——

/lib/ld-linux.so.2: bad ELF interpreter:

32位共享库缺失造成的,可以安装yum install glibc.i686解决,继续报错:

error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory


error while loading shared libraries: libncurses.so.5

继续安装:yum install libncurses.so.5,继续报错:

adb: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory


error while loading shared libraries: libstdc++.so.6

继续安装:yum install libstdc++.so.5,安装出错Error: Multilib version problems found.提示:

  1. Loaded plugins: fastestmirror, product-id, subscription-manager
  2. Updating certificate-based repositories.
  3. Unable to read consumer identity
  4. Loading mirror speeds from cached hostfile
  5. Setting up Install Process
  6. Resolving Dependencies
  7. --> Running transaction check
  8. ---> Package libstdc++.i686 0:4.4.7-4.el6 will be installed
  9. --> Processing Dependency: libgcc_s.so.1(GLIBC_2.0) for package: libstdc++-4.4.7-4.el6.i686
  10. --> Processing Dependency: libgcc_s.so.1(GCC_4.2.0) for package: libstdc++-4.4.7-4.el6.i686
  11. --> Processing Dependency: libgcc_s.so.1(GCC_3.3) for package: libstdc++-4.4.7-4.el6.i686
  12. --> Processing Dependency: libgcc_s.so.1(GCC_3.0) for package: libstdc++-4.4.7-4.el6.i686
  13. --> Processing Dependency: libgcc_s.so.1 for package: libstdc++-4.4.7-4.el6.i686
  14. --> Running transaction check
  15. ---> Package libgcc.i686 0:4.4.7-4.el6 will be installed
  16. --> Finished Dependency Resolution
  17. Error: Multilib version problems found. This often means that the root
  18. cause is something else and multilib version checking is just
  19. pointing out that there is a problem. Eg.:
  20. 1. You have an upgrade for libstdc++ which is missing some
  21. dependency that another package requires. Yum is trying to
  22. solve this by installing an older version of libstdc++ of the
  23. different architecture. If you exclude the bad architecture
  24. yum will tell you what the root cause is (which package
  25. requires what). You can try redoing the upgrade with
  26. --exclude libstdc++.otherarch ... this should give you an error
  27. message showing the root cause of the problem.
  28. 2. You have multiple architectures of libstdc++ installed, but
  29. yum can only see an upgrade for one of those arcitectures.
  30. If you don't want/need both architectures anymore then you
  31. can remove the one with the missing update and everything
  32. will work.
  33. 3. You have duplicate versions of libstdc++ installed already.
  34. You can use "yum check" to get yum show these errors.
  35. ...you can also use --setopt=protected_multilib=false to remove
  36. this checking, however this is almost never the correct thing to
  37. do as something else is very likely to go wrong (often causing
  38. much more problems).
  39. Protected multilib versions: libstdc++-4.4.7-4.el6.i686 != libstdc++-4.4.6-4.el6.x86_64
  40. You could try using --skip-broken to work around the problem
  41. ** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows:
  42. PackageKit-0.5.8-20.el6.x86_64 has missing requires of PackageKit-yum = ('0', '0.5.8', '20.el6')
  43. PackageKit-0.5.8-20.el6.x86_64 has missing requires of PackageKit-yum-plugin = ('0', '0.5.8', '20.el6')
  44. rhn-check-1.0.0-87.el6.noarch has missing requires of yum-rhn-plugin >= ('0', '0.9.1', '35')

其中之前存在的已知问题:(可忽略)

** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows:
PackageKit-0.5.8-20.el6.x86_64 has missing requires of PackageKit-yum = ('0', '0.5.8', '20.el6')
PackageKit-0.5.8-20.el6.x86_64 has missing requires of PackageKit-yum-plugin = ('0', '0.5.8', '20.el6')
rhn-check-1.0.0-87.el6.noarch has missing requires of yum-rhn-plugin >= ('0', '0.9.1', '35')


Error: Multilib version problems found.

可知是多个版本冲突的问题,可参考的解决方式
或者可删除旧版本rpm -aq | grep libstdc | xargs rpm -e --nodeps 参考删除旧yum的做法。
然后再重新安装yum install libstdc++.so.6
但有后遗症,安装过程会提示一些问题,记录如下,造成man命令、mysql无法使用
可以重新安装mysql-server以解决

  1. -bash-4.1# rpm -qa |grep libstd |xargs rpm -e --nodeps
  2. -bash-4.1# rpm -qa |grep libstd
  3. -bash-4.1# yum install libstdc++.so.6
  4. Loaded plugins: fastestmirror, product-id, subscription-manager
  5. Updating certificate-based repositories.
  6. Unable to read consumer identity
  7. Loading mirror speeds from cached hostfile
  8. Setting up Install Process
  9. Resolving Dependencies
  10. --> Running transaction check
  11. ---> Package libstdc++.i686 0:4.4.7-4.el6 will be installed
  12. --> Processing Dependency: libgcc_s.so.1(GLIBC_2.0) for package: libstdc++-4.4.7-4.el6.i686
  13. --> Processing Dependency: libgcc_s.so.1(GCC_4.2.0) for package: libstdc++-4.4.7-4.el6.i686
  14. --> Processing Dependency: libgcc_s.so.1(GCC_3.3) for package: libstdc++-4.4.7-4.el6.i686
  15. --> Processing Dependency: libgcc_s.so.1(GCC_3.0) for package: libstdc++-4.4.7-4.el6.i686
  16. --> Processing Dependency: libgcc_s.so.1 for package: libstdc++-4.4.7-4.el6.i686
  17. --> Running transaction check
  18. ---> Package libgcc.i686 0:4.4.7-4.el6 will be installed
  19. --> Finished Dependency Resolution
  20. Dependencies Resolved
  21. ===========================================================================================================
  22. Package Arch Version Repository Size
  23. ===========================================================================================================
  24. Installing:
  25. libstdc++ i686 4.4.7-4.el6 base 300 k
  26. Installing for dependencies:
  27. libgcc i686 4.4.7-4.el6 base 112 k
  28. Transaction Summary
  29. ===========================================================================================================
  30. Install 2 Package(s)
  31. Total download size: 412 k
  32. Installed size: 1.0 M
  33. Is this ok [y/N]: y
  34. Downloading Packages:
  35. (1/2): libgcc-4.4.7-4.el6.i686.rpm | 112 kB 00:00
  36. (2/2): libstdc++-4.4.7-4.el6.i686.rpm | 300 kB 00:00
  37. -----------------------------------------------------------------------------------------------------------
  38. Total 339 kB/s | 412 kB 00:01
  39. Running rpm_check_debug
  40. Running Transaction Test
  41. Transaction Test Succeeded
  42. Running Transaction
  43. Warning: RPMDB altered outside of yum.
  44. ** Found 233 pre-existing rpmdb problem(s), 'yum check' output follows:
  45. PackageKit-0.5.8-20.el6.x86_64 has missing requires of PackageKit-yum = ('0', '0.5.8', '20.el6')
  46. PackageKit-0.5.8-20.el6.x86_64 has missing requires of PackageKit-yum-plugin = ('0', '0.5.8', '20.el6')
  47. boost-filesystem-1.41.0-11.el6_1.2.x86_64 has missing requires of libstdc++.so.6()(64bit)
  48. boost-filesystem-1.41.0-11.el6_1.2.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  49. boost-filesystem-1.41.0-11.el6_1.2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  50. boost-system-1.41.0-11.el6_1.2.x86_64 has missing requires of libstdc++.so.6()(64bit)
  51. boost-system-1.41.0-11.el6_1.2.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  52. boost-system-1.41.0-11.el6_1.2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  53. cairomm-1.8.0-2.1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  54. cairomm-1.8.0-2.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  55. cairomm-1.8.0-2.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  56. cairomm-1.8.0-2.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
  57. cairomm-1.8.0-2.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
  58. cdrdao-1.2.3-4.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  59. cdrdao-1.2.3-4.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  60. cdrdao-1.2.3-4.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  61. cdrdao-1.2.3-4.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
  62. cdrdao-1.2.3-4.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
  63. 1:cups-1.4.2-48.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  64. 1:cups-1.4.2-48.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  65. 1:cups-1.4.2-48.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  66. 1:cups-libs-1.4.2-48.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  67. 1:cups-libs-1.4.2-48.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  68. 1:cups-libs-1.4.2-48.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  69. dbus-c++-0.5.0-0.10.20090203git13281b3.1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  70. dbus-c++-0.5.0-0.10.20090203git13281b3.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  71. dbus-c++-0.5.0-0.10.20090203git13281b3.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  72. dbus-c++-0.5.0-0.10.20090203git13281b3.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
  73. dbus-c++-0.5.0-0.10.20090203git13281b3.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
  74. dvd+rw-tools-7.1-5.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  75. dvd+rw-tools-7.1-5.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  76. dvd+rw-tools-7.1-5.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  77. 1:enchant-1.5.0-4.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  78. 1:enchant-1.5.0-4.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  79. 1:enchant-1.5.0-4.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  80. evince-libs-2.28.2-14.el6_0.1.x86_64 has missing requires of libstdc++.so.6()(64bit)
  81. evince-libs-2.28.2-14.el6_0.1.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  82. exempi-2.1.0-5.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  83. exempi-2.1.0-5.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  84. exempi-2.1.0-5.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3.1)(64bit)
  85. exempi-2.1.0-5.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  86. exempi-2.1.0-5.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
  87. exempi-2.1.0-5.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
  88. festival-1.96-18.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  89. festival-1.96-18.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  90. festival-1.96-18.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  91. festival-1.96-18.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
  92. festival-1.96-18.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
  93. festival-lib-1.96-18.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  94. festival-lib-1.96-18.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  95. festival-lib-1.96-18.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  96. festival-lib-1.96-18.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
  97. festival-lib-1.96-18.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
  98. festival-speechtools-libs-1.2.96-18.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  99. festival-speechtools-libs-1.2.96-18.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  100. festival-speechtools-libs-1.2.96-18.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  101. festival-speechtools-libs-1.2.96-18.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
  102. festival-speechtools-libs-1.2.96-18.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
  103. firefox-10.0.5-1.el6_2.x86_64 has missing requires of libstdc++.so.6()(64bit)
  104. firefox-10.0.5-1.el6_2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  105. flac-1.2.1-6.1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  106. flac-1.2.1-6.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  107. flac-1.2.1-6.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  108. gconfmm26-2.28.0-1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  109. gconfmm26-2.28.0-1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  110. gconfmm26-2.28.0-1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  111. ghostscript-8.70-14.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  112. glibmm24-2.22.1-1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  113. glibmm24-2.22.1-1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  114. glibmm24-2.22.1-1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  115. glibmm24-2.22.1-1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
  116. gmp-4.3.1-7.el6_2.2.x86_64 has missing requires of libstdc++.so.6()(64bit)
  117. gmp-4.3.1-7.el6_2.2.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  118. gmp-4.3.1-7.el6_2.2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  119. gmp-4.3.1-7.el6_2.2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
  120. gnome-system-monitor-2.28.0-11.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  121. gnome-system-monitor-2.28.0-11.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  122. gnome-system-monitor-2.28.0-11.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  123. gnome-system-monitor-2.28.0-11.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
  124. gnome-system-monitor-2.28.0-11.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
  125. gnote-0.6.3-3.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  126. gnote-0.6.3-3.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  127. gnote-0.6.3-3.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  128. gnote-0.6.3-3.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.10)(64bit)
  129. gnote-0.6.3-3.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
  130. gnote-0.6.3-3.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
  131. gnutls-2.8.5-4.el6_2.2.x86_64 has missing requires of libstdc++.so.6()(64bit)
  132. gnutls-2.8.5-4.el6_2.2.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  133. gnutls-2.8.5-4.el6_2.2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  134. groff-1.18.1.4-21.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  135. groff-1.18.1.4-21.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  136. groff-1.18.1.4-21.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  137. gstreamer-plugins-good-0.10.23-1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  138. gstreamer-plugins-good-0.10.23-1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  139. gstreamer-plugins-good-0.10.23-1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  140. gtkmm24-2.18.2-1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  141. gtkmm24-2.18.2-1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  142. gtkmm24-2.18.2-1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  143. 1:hpijs-3.10.9-3.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  144. 1:hpijs-3.10.9-3.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  145. 1:hpijs-3.10.9-3.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  146. hunspell-1.2.8-16.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  147. hunspell-1.2.8-16.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  148. hunspell-1.2.8-16.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  149. ibus-pinyin-1.3.8-1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  150. ibus-pinyin-1.3.8-1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  151. ibus-pinyin-1.3.8-1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  152. ibus-pinyin-1.3.8-1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
  153. ibus-qt-1.3.0-2.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  154. ibus-qt-1.3.0-2.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  155. ibus-qt-1.3.0-2.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  156. kasumi-2.5-1.1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  157. kasumi-2.5-1.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  158. kasumi-2.5-1.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3.1)(64bit)
  159. kasumi-2.5-1.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  160. kasumi-2.5-1.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
  161. kasumi-2.5-1.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
  162. libcdio-0.81-3.1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  163. libcdio-0.81-3.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  164. libcdio-0.81-3.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  165. libicu-4.2.1-9.1.el6_2.x86_64 has missing requires of libstdc++.so.6()(64bit)
  166. libicu-4.2.1-9.1.el6_2.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  167. libicu-4.2.1-9.1.el6_2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  168. libmusicbrainz3-3.0.2-7.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  169. libmusicbrainz3-3.0.2-7.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  170. libmusicbrainz3-3.0.2-7.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  171. libopenraw-0.0.5-4.1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  172. libopenraw-0.0.5-4.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  173. libopenraw-0.0.5-4.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  174. libopenraw-0.0.5-4.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
  175. libopenraw-0.0.5-4.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
  176. libpanelappletmm-2.26.0-3.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  177. libpanelappletmm-2.26.0-3.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  178. libpanelappletmm-2.26.0-3.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  179. libplist-1.2-1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  180. libplist-1.2-1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  181. libplist-1.2-1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  182. libsigc++20-2.2.4.2-1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  183. libsigc++20-2.2.4.2-1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  184. libsigc++20-2.2.4.2-1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  185. libtiff-3.9.4-5.el6_2.x86_64 has missing requires of libstdc++.so.6()(64bit)
  186. libtiff-3.9.4-5.el6_2.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  187. libtiff-3.9.4-5.el6_2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  188. libtiff-3.9.4-5.el6_2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
  189. libusb-0.1.12-23.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  190. libusb-0.1.12-23.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  191. libusb-0.1.12-23.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  192. mesa-dri-drivers-7.11-5.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  193. mesa-dri-drivers-7.11-5.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  194. mesa-dri-drivers-7.11-5.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  195. mesa-libGL-7.11-5.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  196. mesa-libGLU-7.11-5.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  197. mesa-libGLU-7.11-5.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  198. mesa-libGLU-7.11-5.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  199. mysql-5.1.73-3.el6_5.x86_64 has missing requires of libstdc++.so.6()(64bit)
  200. mysql-5.1.73-3.el6_5.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  201. mysql-5.1.73-3.el6_5.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  202. mysql-server-5.1.73-3.el6_5.x86_64 has missing requires of libstdc++.so.6()(64bit)
  203. mysql-server-5.1.73-3.el6_5.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  204. mysql-server-5.1.73-3.el6_5.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  205. pangomm-2.26.0-1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  206. pangomm-2.26.0-1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  207. pangomm-2.26.0-1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  208. pcre-7.8-4.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  209. pcre-7.8-4.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  210. pcre-7.8-4.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  211. pcre-7.8-4.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
  212. 1:phonon-backend-gstreamer-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  213. 1:phonon-backend-gstreamer-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  214. 1:phonon-backend-gstreamer-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  215. poppler-0.12.4-3.el6_0.1.x86_64 has missing requires of libstdc++.so.6()(64bit)
  216. poppler-0.12.4-3.el6_0.1.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  217. poppler-0.12.4-3.el6_0.1.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  218. poppler-glib-0.12.4-3.el6_0.1.x86_64 has missing requires of libstdc++.so.6()(64bit)
  219. poppler-glib-0.12.4-3.el6_0.1.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  220. poppler-glib-0.12.4-3.el6_0.1.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  221. poppler-utils-0.12.4-3.el6_0.1.x86_64 has missing requires of libstdc++.so.6()(64bit)
  222. poppler-utils-0.12.4-3.el6_0.1.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  223. poppler-utils-0.12.4-3.el6_0.1.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  224. ppl-0.10.2-11.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  225. ppl-0.10.2-11.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  226. ppl-0.10.2-11.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  227. ppl-0.10.2-11.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
  228. ppl-0.10.2-11.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
  229. 1:qt-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  230. 1:qt-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  231. 1:qt-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  232. 1:qt-sqlite-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  233. 1:qt-sqlite-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  234. 1:qt-sqlite-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  235. 1:qt-x11-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  236. 1:qt-x11-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  237. 1:qt-x11-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  238. qt3-3.3.8b-30.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  239. qt3-3.3.8b-30.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  240. qt3-3.3.8b-30.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  241. rarian-0.8.1-5.1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  242. rarian-0.8.1-5.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  243. rarian-0.8.1-5.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  244. rarian-compat-0.8.1-5.1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  245. rarian-compat-0.8.1-5.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  246. rarian-compat-0.8.1-5.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  247. redhat-lsb-4.0-3.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  248. rhn-check-1.0.0-87.el6.noarch has missing requires of yum-rhn-plugin >= ('0', '0.9.1', '35')
  249. 1:smartmontools-5.42-2.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  250. 1:smartmontools-5.42-2.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  251. 1:smartmontools-5.42-2.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  252. systemtap-runtime-1.7-5.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  253. systemtap-runtime-1.7-5.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  254. systemtap-runtime-1.7-5.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  255. systemtap-runtime-1.7-5.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
  256. systemtap-runtime-1.7-5.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
  257. taglib-1.6.1-1.1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  258. taglib-1.6.1-1.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  259. taglib-1.6.1-1.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  260. taglib-1.6.1-1.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
  261. taglib-1.6.1-1.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
  262. totem-mozplugin-2.28.6-2.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  263. totem-mozplugin-2.28.6-2.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  264. totem-mozplugin-2.28.6-2.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  265. ttmkfdir-3.0.9-32.1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
  266. ttmkfdir-3.0.9-32.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  267. ttmkfdir-3.0.9-32.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  268. ttmkfdir-3.0.9-32.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
  269. ttmkfdir-3.0.9-32.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
  270. webkitgtk-1.2.6-2.el6_0.x86_64 has missing requires of libstdc++.so.6()(64bit)
  271. webkitgtk-1.2.6-2.el6_0.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  272. xulrunner-10.0.5-1.el6_2.x86_64 has missing requires of libstdc++.so.6()(64bit)
  273. xulrunner-10.0.5-1.el6_2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  274. xulrunner-10.0.5-1.el6_2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
  275. yelp-2.28.1-13.el6_2.x86_64 has missing requires of libstdc++.so.6()(64bit)
  276. yelp-2.28.1-13.el6_2.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
  277. yelp-2.28.1-13.el6_2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
  278. Installing : libgcc-4.4.7-4.el6.i686 1/2
  279. Installing : libstdc++-4.4.7-4.el6.i686 2/2
  280. Installed products updated.
  281. Verifying : libstdc++-4.4.7-4.el6.i686 1/2
  282. Verifying : libgcc-4.4.7-4.el6.i686 2/2
  283. Installed:
  284. libstdc++.i686 0:4.4.7-4.el6
  285. Dependency Installed:
  286. libgcc.i686 0:4.4.7-4.el6
  287. Complete!

error while loading shared libraries: libz.so.1:

安装yum install -y zlib.i686 -y参数表示不进行提示,直接安装
效果通下面的操作一样

在64位的机器上运行zipalign (在对应用进行签名时会用到)时需要用到libz.so.1 32位的版本。可以从32位的Ubuntu上拷一个,放到目标机器上的/lib/文件夹下。Ubuntu中libz.so.1的位置如下,可以用FTP或其他方式,把libz.so.1所链接的真实文件libz.so.1.2.3.4到目标机器,放在目前机器的/lib文件夹下。然后执行:
ln –s /lib/libz.so.1.2.3.4 /lib/libz.so.1
如果提示libz.so.1已经存在,可以先将旧的删除,执行:rm /lib/libz.so.1



更改环境变量


编写环境变量:

在/etc/profile里写入如下:注意变量Android_home最后的分隔符号/(不应该添加这个文件分隔符),新添加的变量最后的分隔符/在引用时注意,如export ANDROID_HOME=/usr/share/android-sdk-linux/的情况下,$ANDROID_HOME/tools最终的结果为/usr/share/android-sdk-linux//tools,多了一个分隔符。

  1. #vi /etc/profile
  2. export ANDROID_HOME=/usr/share/android-sdk-linux
  3. export JAVA_HOME=/usr/java/jdk1.6.0_45
  4. export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
  5. export PATH=$PATH:$JAVA_HOME/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools

上面


使环境变量生效:

  1. #source /etc/profile

随机启动

将运行的脚本添加到/etc/rc.d/rc.local下即可。可执行脚本/home/gebitang/run.sh

  1. #!/bin/sh
  2. #
  3. # This script will be executed *after* all the other init scripts.
  4. # You can put your own initialization stuff in here if you don't
  5. # want to do the full Sys V style init stuff.
  6. touch /var/lock/subsys/local
  7. # start adb server
  8. sudo killall adb
  9. cd /usr/share/android-sdk-linux/platform-tools
  10. sudo ./adb start-server
  11. #start ControlServer
  12. cd /usr/share/ControlServer
  13. ./run.sh
  14. #export environment
  15. export PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/java/jdk1.6.0_45/bin:/usr/share/android-sdk-linux/platform-tools:/usr/share/android-sdk-linux/tools:/home/agentone/bin
  16. export ANDROID_HOME=/usr/share/android-sdk-linux/
  17. export JAVA_HOME=/usr/java/jdk1.6.0_45/
  18. #start tomcat
  19. cd /usr/share/tomcat/bin
  20. ./startup.sh
  21. #start mysql server
  22. /etc/init.d/mysqld start
  23. #start vsftp server
  24. /etc/init.d/vsftpd start
  25. run local script
  26. /home/gebitang/run.sh
  27. #log time
  28. echo time-`date +%Y%m%d%H%M%S`-log >> /home/gebitang/record.log

需要注意得是:此时是以root用户进行启动的,用户设置的PATH中的环境变量均会丢失。所以用户的run.sh脚本需要讲PATH变量重新export,如:

  1. #!/bin/bash
  2. export PATH=$PATH:/usr/lib/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/share/android-sdk-linux/platform-tools:/usr/share/android-sdk-linux/tools:/home/gebitang/bin
  3. cd /home/gebitang/Desktop/
  4. echo $PATH >> ./record.log
  5. # Create dir logs if it doesn't exist
  6. if [ ! -d "./_logs" ]
  7. then
  8. mkdir ./_logs
  9. fi
  10. java -Dfile.encoding=utf-8 -Xms256m -Xmx1024m -Xss1m -jar Test.jar &> log-`date +%Y%m%d%H%M%S`.txt &


本地编译安装程序

提示没有configure: error

configure: error: no acceptable C compiler found in $PATH
yum install gcc安装gcc编译环境


编译安装步骤

  1. tar zxvf apr-1.5.1.tar.gz
  2. cd apr-1.5.1
  3. ./configure
  4. make
  5. make install
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注