@Gebitang
2015-01-13T14:39:39.000000Z
字数 43227
阅读 3409
linux
redhat
本文环境位64位RedHat 6.3系统
需要su到root用户进行管理
略
[gebitang@js ~]$ scp agentone@192.168.113.34:/home/agentone/android-sdk-linux.tar.gz ./
[gebitang@js ~]$ tar zxvf android-sdk-linux.tar.gz
[gebitang@js ~]$ sudo mv ./android-sdk-linux /usr/share/
append the following code to /etc/profile
PATH=$PATH:/usr/share/android-sdk-linux/platform-tools:/usr/share/android-sdk-linux/tools
export PATH
make it work right now: source /etc/profile
scp agentone@192.168.113.34:/home/agentone/Desktop/TA.tar.gz ./
tar zvxf TA.tar.gz
tar cf sigar.tar *.*
生成的tar包中不保护以.
开头的文件,如.sigar_shellrc
tar -rf sigar.tar .sigar_shellrc
/usr/lib
文件夹下即可tar xvf sigar.tar
, 删除tar包sudo mv ./*.* /usr/lib
,需要将.sigar_shellrc
文件单独移到
mkdir sigar
cd sigar
scp agentone@192.168.100.188:/home/agentone/sigar.tar ./
tar xvf sigar.tar
rm sigar.tar
ls -al /usr/lib |wc -l
sudo mv ./* /usr/lib
sudo mv .sigar_shellrc /usr/lib
ls -al /usr/lib |wc -l
ls -al /usr/lib |grep sigar|wc -l
#23 files
append your script to /etc/rc.d/rc.local
,
#start adb server
sudo killall adb
cd /usr/share/android-sdk-linux/platform-tools
./adb start-server
#run TestAgent jar file
/home/agentone/Desktop/TA/runTA.sh
由于 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
rpm -aq | grep yum | xargs rpm -e --nodeps
注意,如果下载时找不到文件,就登录到:http://mirrors.163.com/centos/6/os/x86_64/ 上查找相应的文件。然后再下载。
wget http://tel.mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpm
wget http://tel.mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://tel.mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
wget http://tel.mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
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
内容如下:
[base]
name=CentOS-6 - Base - 163.com
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
priority=1
#released updates
[updates]
name=CentOS-6 - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
priority=1
#additional packages that may be useful
[extras]
name=CentOS-6 - Extras - 163.com
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
priority=1
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
priority=2
#contrib - packages by Centos Users
[contrib]
name=CentOS-6 - Contrib - 163.com
baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
priority=1
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
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
由于Redhat Enterprise Linux 6.3 中自带安装了OpenJDK1.6(事实上只是jre?)。
ls -l | more
#查看文件属性。D开头文件夹;l开头表示link;-开头文件
或/usr/bin
目录下,file java
查看link的目录
执行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
已被卸了。
直接从官网主页不好找,这是历史版本综合页面: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
下进行配置,否则一般的应用程序无法进行访问。
资料文章
yum install mysql-server
自动安装log如下:
[root@testagent yum.repos.d]# yum install mysql-server
Loaded plugins: fastestmirror, product-id, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql-server.x86_64 0:5.1.73-3.el6_5 will be installed
--> Processing Dependency: mysql = 5.1.73-3.el6_5 for package: mysql-server-5.1.73-3.el6_5.x86_64
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.73-3.el6_5.x86_64
--> Processing Dependency: libssl.so.10(libssl.so.10)(64bit) for package: mysql-server-5.1.73-3.el6_5.x86_64
--> Processing Dependency: libcrypto.so.10(libcrypto.so.10)(64bit) for package: mysql-server-5.1.73-3.el6_5.x86_64
--> Running transaction check
---> Package mysql.x86_64 0:5.1.73-3.el6_5 will be installed
--> Processing Dependency: mysql-libs = 5.1.73-3.el6_5 for package: mysql-5.1.73-3.el6_5.x86_64
---> Package openssl.x86_64 0:1.0.0-20.el6_2.5 will be updated
---> Package openssl.x86_64 0:1.0.1e-16.el6_5.14 will be an update
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
--> Running transaction check
---> Package mysql-libs.x86_64 0:5.1.61-4.el6 will be updated
---> Package mysql-libs.x86_64 0:5.1.73-3.el6_5 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
mysql-server x86_64 5.1.73-3.el6_5 updates 8.6 M
Installing for dependencies:
mysql x86_64 5.1.73-3.el6_5 updates 894 k
perl-DBD-MySQL x86_64 4.013-3.el6 base 134 k
Updating for dependencies:
mysql-libs x86_64 5.1.73-3.el6_5 updates 1.2 M
openssl x86_64 1.0.1e-16.el6_5.14 updates 1.5 M
Transaction Summary
================================================================================
Install 3 Package(s)
Upgrade 2 Package(s)
Total download size: 12 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): mysql-5.1.73-3.el6_5.x86_64.rpm | 894 kB 00:21
(2/5): mysql-libs-5.1.73-3.el6_5.x86_64.rpm | 1.2 MB 00:25
(3/5): mysql-server-5.1.73-3.el6_5.x86_64.rpm | 8.6 MB 00:46
(4/5): openssl-1.0.1e-16.el6_5.14.x86_64.rpm | 1.5 MB 00:12
(5/5): perl-DBD-MySQL-4.013-3.el6.x86_64.rpm | 134 kB 00:01
--------------------------------------------------------------------------------
Total 116 kB/s | 12 MB 01:49
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Retrieving key from http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid: "CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>"
From : http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
** 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')
Updating : openssl-1.0.1e-16.el6_5.14.x86_64 1/7
Updating : mysql-libs-5.1.73-3.el6_5.x86_64 2/7
Installing : perl-DBD-MySQL-4.013-3.el6.x86_64 3/7
Installing : mysql-5.1.73-3.el6_5.x86_64 4/7
Installing : mysql-server-5.1.73-3.el6_5.x86_64 5/7
Cleanup : mysql-libs-5.1.61-4.el6.x86_64 6/7
Cleanup : openssl-1.0.0-20.el6_2.5.x86_64 7/7
Installed products updated.
Verifying : perl-DBD-MySQL-4.013-3.el6.x86_64 1/7
Verifying : mysql-libs-5.1.73-3.el6_5.x86_64 2/7
Verifying : mysql-server-5.1.73-3.el6_5.x86_64 3/7
Verifying : mysql-5.1.73-3.el6_5.x86_64 4/7
Verifying : openssl-1.0.1e-16.el6_5.14.x86_64 5/7
Verifying : mysql-libs-5.1.61-4.el6.x86_64 6/7
Verifying : openssl-1.0.0-20.el6_2.5.x86_64 7/7
Installed:
mysql-server.x86_64 0:5.1.73-3.el6_5
Dependency Installed:
mysql.x86_64 0:5.1.73-3.el6_5 perl-DBD-MySQL.x86_64 0:4.013-3.el6
Dependency Updated:
mysql-libs.x86_64 0:5.1.73-3.el6_5 openssl.x86_64 0:1.0.1e-16.el6_5.14
Complete!
[root@testagent yum.repos.d]#
默认的/etc/my.conf文件内容有限,可以先进行备份,然后在/usr/share/mysql/下找到*.cnf文件,拷贝其中一个到/etc/并改名为 my.cnf)中。命令如下:cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
/etc/init.d/mysqld start
初次启动log:
[root@testagent etc]# /etc/init.d/mysqld start
初始化 MySQL 数据库: WARNING: The host 'testagent' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Installing MySQL system tables...
140626 16:12:54 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
140626 16:12:54 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
OK
Filling help tables...
140626 16:12:55 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
140626 16:12:55 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h testagent password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/bin/mysqlbug script!
[确定]
正在启动 mysqld: [确定]
[root@testagent etc]#
三种方式:
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
[agentone@testagent mysql]$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 5.1.73-log Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use mysql;
Database changed
mysql> update user set password=PASSWORD('123456') where User='root';
Query OK, 3 rows affected (0.00 sec)
Rows matched: 3 Changed: 3 Warnings: 0
mysql> exit;
Bye
b). 或者按照初次启动的提示执行:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h testagent password 'new-password'
c). 或者启动之后,执行/usr/bin/mysql_secure_installation
mysql -u root –p
mysql>use mysql;
mysql>update user set host = '%' where user = 'root';
mysql>exit;
yum install MySQL-python
注意大小写
验证:进入python环境,import MySQLdb
无错误即表示成功。
用来支持python连接数据库
在/etc/sysconfig/iptables
里面添加规则:
vi /etc/sysconfig/iptables
-I INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
然后重启iptables service iptables restart
或 /etc/init.d/iptables restart
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用户的密码;
编辑文件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
模块,如下:
vi /etc/sysconfig/iptables-config
IPTABLES_MODULES="ip_nat_ftp"
IPTABLES_MODULES="ip_conntrack_ftp"
在iptables里添加规则:
vi /etc/sysconfig/iptables
-I INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-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
中的参数进行更为细致的配置
tar zxvf apache-tomcat-7.0.54.tar.gz
vi /usr/share/tomcat/conf/server.xml
修改Connector 端口位80
Tomcat正常启动,catalina.out
log里面没有报错
确定本地可以访问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服务即可
将jdk的lib目录下tools.jar包拷贝到tomcat的lib文件夹下
解决方法:资料
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 library
和OpenSSL 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
可以在上述文件中添加环境变量
下载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 devices
依次遇到下列问题——
32位共享库缺失造成的,可以安装yum install glibc.i686
解决,继续报错:
error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
继续安装:yum install libncurses.so.5
,继续报错:
adb: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
继续安装:yum install libstdc++.so.5
,安装出错Error: Multilib version problems found.
提示:
Loaded plugins: fastestmirror, product-id, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package libstdc++.i686 0:4.4.7-4.el6 will be installed
--> Processing Dependency: libgcc_s.so.1(GLIBC_2.0) for package: libstdc++-4.4.7-4.el6.i686
--> Processing Dependency: libgcc_s.so.1(GCC_4.2.0) for package: libstdc++-4.4.7-4.el6.i686
--> Processing Dependency: libgcc_s.so.1(GCC_3.3) for package: libstdc++-4.4.7-4.el6.i686
--> Processing Dependency: libgcc_s.so.1(GCC_3.0) for package: libstdc++-4.4.7-4.el6.i686
--> Processing Dependency: libgcc_s.so.1 for package: libstdc++-4.4.7-4.el6.i686
--> Running transaction check
---> Package libgcc.i686 0:4.4.7-4.el6 will be installed
--> Finished Dependency Resolution
Error: Multilib version problems found. This often means that the root
cause is something else and multilib version checking is just
pointing out that there is a problem. Eg.:
1. You have an upgrade for libstdc++ which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of libstdc++ of the
different architecture. If you exclude the bad architecture
yum will tell you what the root cause is (which package
requires what). You can try redoing the upgrade with
--exclude libstdc++.otherarch ... this should give you an error
message showing the root cause of the problem.
2. You have multiple architectures of libstdc++ installed, but
yum can only see an upgrade for one of those arcitectures.
If you don't want/need both architectures anymore then you
can remove the one with the missing update and everything
will work.
3. You have duplicate versions of libstdc++ installed already.
You can use "yum check" to get yum show these errors.
...you can also use --setopt=protected_multilib=false to remove
this checking, however this is almost never the correct thing to
do as something else is very likely to go wrong (often causing
much more problems).
Protected multilib versions: libstdc++-4.4.7-4.el6.i686 != libstdc++-4.4.6-4.el6.x86_64
You could try using --skip-broken to work around the problem
** 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')
其中之前存在的已知问题:(可忽略)
** 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')
可知是多个版本冲突的问题,可参考的解决方式
或者可删除旧版本rpm -aq | grep libstdc | xargs rpm -e --nodeps
参考删除旧yum的做法。
然后再重新安装yum install libstdc++.so.6
但有后遗症,安装过程会提示一些问题,记录如下,造成man命令、mysql无法使用
可以重新安装mysql-server以解决
-bash-4.1# rpm -qa |grep libstd |xargs rpm -e --nodeps
-bash-4.1# rpm -qa |grep libstd
-bash-4.1# yum install libstdc++.so.6
Loaded plugins: fastestmirror, product-id, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package libstdc++.i686 0:4.4.7-4.el6 will be installed
--> Processing Dependency: libgcc_s.so.1(GLIBC_2.0) for package: libstdc++-4.4.7-4.el6.i686
--> Processing Dependency: libgcc_s.so.1(GCC_4.2.0) for package: libstdc++-4.4.7-4.el6.i686
--> Processing Dependency: libgcc_s.so.1(GCC_3.3) for package: libstdc++-4.4.7-4.el6.i686
--> Processing Dependency: libgcc_s.so.1(GCC_3.0) for package: libstdc++-4.4.7-4.el6.i686
--> Processing Dependency: libgcc_s.so.1 for package: libstdc++-4.4.7-4.el6.i686
--> Running transaction check
---> Package libgcc.i686 0:4.4.7-4.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================================
Package Arch Version Repository Size
===========================================================================================================
Installing:
libstdc++ i686 4.4.7-4.el6 base 300 k
Installing for dependencies:
libgcc i686 4.4.7-4.el6 base 112 k
Transaction Summary
===========================================================================================================
Install 2 Package(s)
Total download size: 412 k
Installed size: 1.0 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): libgcc-4.4.7-4.el6.i686.rpm | 112 kB 00:00
(2/2): libstdc++-4.4.7-4.el6.i686.rpm | 300 kB 00:00
-----------------------------------------------------------------------------------------------------------
Total 339 kB/s | 412 kB 00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
** Found 233 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')
boost-filesystem-1.41.0-11.el6_1.2.x86_64 has missing requires of libstdc++.so.6()(64bit)
boost-filesystem-1.41.0-11.el6_1.2.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
boost-filesystem-1.41.0-11.el6_1.2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
boost-system-1.41.0-11.el6_1.2.x86_64 has missing requires of libstdc++.so.6()(64bit)
boost-system-1.41.0-11.el6_1.2.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
boost-system-1.41.0-11.el6_1.2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
cairomm-1.8.0-2.1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
cairomm-1.8.0-2.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
cairomm-1.8.0-2.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
cairomm-1.8.0-2.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
cairomm-1.8.0-2.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
cdrdao-1.2.3-4.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
cdrdao-1.2.3-4.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
cdrdao-1.2.3-4.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
cdrdao-1.2.3-4.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
cdrdao-1.2.3-4.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
1:cups-1.4.2-48.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
1:cups-1.4.2-48.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
1:cups-1.4.2-48.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
1:cups-libs-1.4.2-48.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
1:cups-libs-1.4.2-48.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
1:cups-libs-1.4.2-48.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
dbus-c++-0.5.0-0.10.20090203git13281b3.1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
dbus-c++-0.5.0-0.10.20090203git13281b3.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
dbus-c++-0.5.0-0.10.20090203git13281b3.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
dbus-c++-0.5.0-0.10.20090203git13281b3.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
dbus-c++-0.5.0-0.10.20090203git13281b3.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
dvd+rw-tools-7.1-5.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
dvd+rw-tools-7.1-5.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
dvd+rw-tools-7.1-5.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
1:enchant-1.5.0-4.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
1:enchant-1.5.0-4.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
1:enchant-1.5.0-4.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
evince-libs-2.28.2-14.el6_0.1.x86_64 has missing requires of libstdc++.so.6()(64bit)
evince-libs-2.28.2-14.el6_0.1.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
exempi-2.1.0-5.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
exempi-2.1.0-5.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
exempi-2.1.0-5.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3.1)(64bit)
exempi-2.1.0-5.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
exempi-2.1.0-5.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
exempi-2.1.0-5.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
festival-1.96-18.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
festival-1.96-18.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
festival-1.96-18.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
festival-1.96-18.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
festival-1.96-18.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
festival-lib-1.96-18.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
festival-lib-1.96-18.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
festival-lib-1.96-18.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
festival-lib-1.96-18.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
festival-lib-1.96-18.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
festival-speechtools-libs-1.2.96-18.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
festival-speechtools-libs-1.2.96-18.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
festival-speechtools-libs-1.2.96-18.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
festival-speechtools-libs-1.2.96-18.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
festival-speechtools-libs-1.2.96-18.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
firefox-10.0.5-1.el6_2.x86_64 has missing requires of libstdc++.so.6()(64bit)
firefox-10.0.5-1.el6_2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
flac-1.2.1-6.1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
flac-1.2.1-6.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
flac-1.2.1-6.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
gconfmm26-2.28.0-1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
gconfmm26-2.28.0-1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
gconfmm26-2.28.0-1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
ghostscript-8.70-14.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
glibmm24-2.22.1-1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
glibmm24-2.22.1-1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
glibmm24-2.22.1-1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
glibmm24-2.22.1-1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
gmp-4.3.1-7.el6_2.2.x86_64 has missing requires of libstdc++.so.6()(64bit)
gmp-4.3.1-7.el6_2.2.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
gmp-4.3.1-7.el6_2.2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
gmp-4.3.1-7.el6_2.2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
gnome-system-monitor-2.28.0-11.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
gnome-system-monitor-2.28.0-11.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
gnome-system-monitor-2.28.0-11.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
gnome-system-monitor-2.28.0-11.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
gnome-system-monitor-2.28.0-11.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
gnote-0.6.3-3.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
gnote-0.6.3-3.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
gnote-0.6.3-3.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
gnote-0.6.3-3.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.10)(64bit)
gnote-0.6.3-3.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
gnote-0.6.3-3.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
gnutls-2.8.5-4.el6_2.2.x86_64 has missing requires of libstdc++.so.6()(64bit)
gnutls-2.8.5-4.el6_2.2.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
gnutls-2.8.5-4.el6_2.2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
groff-1.18.1.4-21.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
groff-1.18.1.4-21.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
groff-1.18.1.4-21.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
gstreamer-plugins-good-0.10.23-1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
gstreamer-plugins-good-0.10.23-1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
gstreamer-plugins-good-0.10.23-1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
gtkmm24-2.18.2-1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
gtkmm24-2.18.2-1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
gtkmm24-2.18.2-1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
1:hpijs-3.10.9-3.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
1:hpijs-3.10.9-3.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
1:hpijs-3.10.9-3.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
hunspell-1.2.8-16.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
hunspell-1.2.8-16.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
hunspell-1.2.8-16.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
ibus-pinyin-1.3.8-1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
ibus-pinyin-1.3.8-1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
ibus-pinyin-1.3.8-1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
ibus-pinyin-1.3.8-1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
ibus-qt-1.3.0-2.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
ibus-qt-1.3.0-2.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
ibus-qt-1.3.0-2.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
kasumi-2.5-1.1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
kasumi-2.5-1.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
kasumi-2.5-1.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3.1)(64bit)
kasumi-2.5-1.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
kasumi-2.5-1.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
kasumi-2.5-1.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
libcdio-0.81-3.1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
libcdio-0.81-3.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
libcdio-0.81-3.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
libicu-4.2.1-9.1.el6_2.x86_64 has missing requires of libstdc++.so.6()(64bit)
libicu-4.2.1-9.1.el6_2.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
libicu-4.2.1-9.1.el6_2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
libmusicbrainz3-3.0.2-7.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
libmusicbrainz3-3.0.2-7.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
libmusicbrainz3-3.0.2-7.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
libopenraw-0.0.5-4.1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
libopenraw-0.0.5-4.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
libopenraw-0.0.5-4.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
libopenraw-0.0.5-4.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
libopenraw-0.0.5-4.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
libpanelappletmm-2.26.0-3.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
libpanelappletmm-2.26.0-3.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
libpanelappletmm-2.26.0-3.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
libplist-1.2-1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
libplist-1.2-1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
libplist-1.2-1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
libsigc++20-2.2.4.2-1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
libsigc++20-2.2.4.2-1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
libsigc++20-2.2.4.2-1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
libtiff-3.9.4-5.el6_2.x86_64 has missing requires of libstdc++.so.6()(64bit)
libtiff-3.9.4-5.el6_2.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
libtiff-3.9.4-5.el6_2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
libtiff-3.9.4-5.el6_2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
libusb-0.1.12-23.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
libusb-0.1.12-23.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
libusb-0.1.12-23.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
mesa-dri-drivers-7.11-5.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
mesa-dri-drivers-7.11-5.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
mesa-dri-drivers-7.11-5.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
mesa-libGL-7.11-5.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
mesa-libGLU-7.11-5.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
mesa-libGLU-7.11-5.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
mesa-libGLU-7.11-5.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
mysql-5.1.73-3.el6_5.x86_64 has missing requires of libstdc++.so.6()(64bit)
mysql-5.1.73-3.el6_5.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
mysql-5.1.73-3.el6_5.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
mysql-server-5.1.73-3.el6_5.x86_64 has missing requires of libstdc++.so.6()(64bit)
mysql-server-5.1.73-3.el6_5.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
mysql-server-5.1.73-3.el6_5.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
pangomm-2.26.0-1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
pangomm-2.26.0-1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
pangomm-2.26.0-1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
pcre-7.8-4.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
pcre-7.8-4.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
pcre-7.8-4.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
pcre-7.8-4.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
1:phonon-backend-gstreamer-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
1:phonon-backend-gstreamer-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
1:phonon-backend-gstreamer-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
poppler-0.12.4-3.el6_0.1.x86_64 has missing requires of libstdc++.so.6()(64bit)
poppler-0.12.4-3.el6_0.1.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
poppler-0.12.4-3.el6_0.1.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
poppler-glib-0.12.4-3.el6_0.1.x86_64 has missing requires of libstdc++.so.6()(64bit)
poppler-glib-0.12.4-3.el6_0.1.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
poppler-glib-0.12.4-3.el6_0.1.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
poppler-utils-0.12.4-3.el6_0.1.x86_64 has missing requires of libstdc++.so.6()(64bit)
poppler-utils-0.12.4-3.el6_0.1.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
poppler-utils-0.12.4-3.el6_0.1.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
ppl-0.10.2-11.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
ppl-0.10.2-11.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
ppl-0.10.2-11.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
ppl-0.10.2-11.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
ppl-0.10.2-11.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
1:qt-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
1:qt-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
1:qt-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
1:qt-sqlite-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
1:qt-sqlite-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
1:qt-sqlite-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
1:qt-x11-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
1:qt-x11-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
1:qt-x11-4.6.2-24.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
qt3-3.3.8b-30.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
qt3-3.3.8b-30.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
qt3-3.3.8b-30.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
rarian-0.8.1-5.1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
rarian-0.8.1-5.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
rarian-0.8.1-5.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
rarian-compat-0.8.1-5.1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
rarian-compat-0.8.1-5.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
rarian-compat-0.8.1-5.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
redhat-lsb-4.0-3.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
rhn-check-1.0.0-87.el6.noarch has missing requires of yum-rhn-plugin >= ('0', '0.9.1', '35')
1:smartmontools-5.42-2.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
1:smartmontools-5.42-2.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
1:smartmontools-5.42-2.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
systemtap-runtime-1.7-5.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
systemtap-runtime-1.7-5.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
systemtap-runtime-1.7-5.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
systemtap-runtime-1.7-5.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
systemtap-runtime-1.7-5.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
taglib-1.6.1-1.1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
taglib-1.6.1-1.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
taglib-1.6.1-1.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
taglib-1.6.1-1.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
taglib-1.6.1-1.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
totem-mozplugin-2.28.6-2.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
totem-mozplugin-2.28.6-2.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
totem-mozplugin-2.28.6-2.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
ttmkfdir-3.0.9-32.1.el6.x86_64 has missing requires of libstdc++.so.6()(64bit)
ttmkfdir-3.0.9-32.1.el6.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
ttmkfdir-3.0.9-32.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
ttmkfdir-3.0.9-32.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
ttmkfdir-3.0.9-32.1.el6.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
webkitgtk-1.2.6-2.el6_0.x86_64 has missing requires of libstdc++.so.6()(64bit)
webkitgtk-1.2.6-2.el6_0.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
xulrunner-10.0.5-1.el6_2.x86_64 has missing requires of libstdc++.so.6()(64bit)
xulrunner-10.0.5-1.el6_2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
xulrunner-10.0.5-1.el6_2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
yelp-2.28.1-13.el6_2.x86_64 has missing requires of libstdc++.so.6()(64bit)
yelp-2.28.1-13.el6_2.x86_64 has missing requires of libstdc++.so.6(CXXABI_1.3)(64bit)
yelp-2.28.1-13.el6_2.x86_64 has missing requires of libstdc++.so.6(GLIBCXX_3.4)(64bit)
Installing : libgcc-4.4.7-4.el6.i686 1/2
Installing : libstdc++-4.4.7-4.el6.i686 2/2
Installed products updated.
Verifying : libstdc++-4.4.7-4.el6.i686 1/2
Verifying : libgcc-4.4.7-4.el6.i686 2/2
Installed:
libstdc++.i686 0:4.4.7-4.el6
Dependency Installed:
libgcc.i686 0:4.4.7-4.el6
Complete!
安装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
,多了一个分隔符。
#vi /etc/profile
export ANDROID_HOME=/usr/share/android-sdk-linux
export JAVA_HOME=/usr/java/jdk1.6.0_45
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools
上面
#source /etc/profile
将运行的脚本添加到/etc/rc.d/rc.local
下即可。可执行脚本/home/gebitang/run.sh
:
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
# start adb server
sudo killall adb
cd /usr/share/android-sdk-linux/platform-tools
sudo ./adb start-server
#start ControlServer
cd /usr/share/ControlServer
./run.sh
#export environment
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
export ANDROID_HOME=/usr/share/android-sdk-linux/
export JAVA_HOME=/usr/java/jdk1.6.0_45/
#start tomcat
cd /usr/share/tomcat/bin
./startup.sh
#start mysql server
/etc/init.d/mysqld start
#start vsftp server
/etc/init.d/vsftpd start
# run local script
/home/gebitang/run.sh
#log time
echo time-`date +%Y%m%d%H%M%S`-log >> /home/gebitang/record.log
需要注意得是:此时是以root用户进行启动的,用户设置的PATH
中的环境变量均会丢失。所以用户的run.sh
脚本需要讲PATH
变量重新export,如:
#!/bin/bash
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
cd /home/gebitang/Desktop/
echo $PATH >> ./record.log
# Create dir logs if it doesn't exist
if [ ! -d "./_logs" ]
then
mkdir ./_logs
fi
java -Dfile.encoding=utf-8 -Xms256m -Xmx1024m -Xss1m -jar Test.jar &> log-`date +%Y%m%d%H%M%S`.txt &
configure: error: no acceptable C compiler found in $PATH
yum install gcc
安装gcc编译环境
tar zxvf apr-1.5.1.tar.gz
cd apr-1.5.1
./configure
make
make install