linux安装oracle11g

CentOS7安装Oracle 11gR2 图文详解
注:Oracle11gR2 X64安装
运行安装程序时使用 ./runInstaller -jreLoc /usr/lib/jvm/jre-1.8.0 安装提示框显示不全
一、环境准备
安装包:
1.VMware-workstation-full-11.1.0-2496824.exe
2.CentOS-7-x86_64-DVD-1511.iso
3.linux.x64_11gR2_database_1of2.zip
linux.x64_11gR2_database_2of2.zip
以上觉得不是重点,不给下载地址,不描述安装过程,安装完CentOS 7,截图如下:
 
第一次安装防坑,没有进行任何操作之前,先在VMware中创建该虚拟机快照,后期搞郁闷了,可以回归到该快照版本。特么还是不放心,又把该虚拟机完整克隆一份(强迫症)。
二、安装Oracle前准备
1.创建运行oracle数据库的系统用户和用户组
[sonny@localhost ~]$ su root  #切换到root
Password:
[root@localhost sonny]# groupadd oinstall  #创建用户组oinstall
[root@localhost sonny]# groupadd dba  #创建用户组dba
[root@localhost sonny]# useradd -g oinstall -g dba -m oracle  #创建oracle用户,并加入到oinstall和dba用户组
[root@localhost sonny]# passwd oracle  #设置用户oracle的登陆密码,不设置密码,在CentOS的图形登陆界面没法登陆
Changing password for user oracle.
New password:   # 密码
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:   # 确认密码
passwd: all authentication tokens updated successfully.
[root@localhost sonny]# id oracle # 查看新建的oracle用户
uid=1001(oracle) gid=1002(dba) groups=1002(dba)
[root@localhost sonny]#
为啥要创建oinstall用户组及dba组? 参考:http://www.oracle.com/technetwork/cn/articles/hunter-rac11gr2-iscsi-2-092412-zhs.html#13
理论上单例按照需要3种用户组,实际只建两个oinstall和dba,后面再安装oracle数据库的时候把OSOPER组也设置是dba组。
a.oracle 清单组(一般为oinstall):
OINSTALL 组的成员被视为 Oracle 软件的“所有者”,拥有对 Oracle 中央清单 (oraInventory) 的写入权限。在一个 Linux 系统上首次安装 Oracle 软件时,OUI 会创建 /etc/oraInst.loc 文件。该文件指定 Oracle 清单组的名称(默认为 oinstall)以及 Oracle 中央清单目录的路径。
b.数据库管理员(OSDBA,一般为 dba):
OSDBA 组的成员可通过操作系统身份验证使用 SQL 以 SYSDBA 身份连接到一个 Oracle 实例。该组的成员可执行关键的数据库管理任务,如创建数据库、启动和关闭实例。该组的默认名称为dba。SYSDBA 系统权限甚至在数据库未打开时也允许访问数据库实例。对此权限的控制完全超出了数据库本身的范围。不要混淆 SYSDBA系统权限与数据库角色 DBA。DBA 角色不包括 SYSDBA 或 SYSOPER 系统权限。
c.数据库操作员组(OSOPER,一般为 oper):
OSOPER 组的成员可通过操作系统身份验证使用 SQL 以 SYSOPER 身份连接到一个 Oracle 实例。这个可选组的成员拥有一组有限的数据库管理权限,如管理和运行备份。
该组的默认名称为oper。SYSOPER 系统权限甚至在数据库未打开时也允许访问数据库实例。对此权限的控制完全超出了数据库本身的范围。要使用该组,选择 Advanced 安装类型来安装 Oracle 数据库软件。 
2.创建oracle数据库安装目录
[sonny@localhost ~]$ su root
Password:
[root@localhost sonny]# mkdir -p /data/oracle  #oracle数据库安装目录
[root@localhost sonny]# mkdir -p /data/oraInventory  #oracle数据库配置文件目录
[root@localhost sonny]# mkdir -p /data/database  #oracle数据库软件包解压目录
[root@localhost sonny]# cd /data
[root@localhost data]# ls  #创建完毕检查一下
database oracle oraInventory
[root@localhost data]# chown -R oracle:oinstall /data/oracle  #设置目录所有者为oinstall用户组的oracle用户
[root@localhost data]# chown -R oracle:oinstall /data/oraInventory
[root@localhost data]# chown -R oracle:oinstall /data/database
[root@localhost data]#  
3.修改OS系统标识
 oracle默认不支持CentOS系统安装,Oracle Database 11g Release 2 的 OS的要求,参考:https://docs.oracle.com/cd/E11882_01/install.112/e47689/pre_install.htm#LADBI1106。我安装是64位数据库,On Linux x86-64:Red Hat Enterprise Linux 7 ?(RHEL 7)另外,CentOS7.0.1511 基于 RHEL7.2 ?参考:http://www.linuxidc.com/Linux/2015-12/126283.htm
修改文件/etc/RedHat-release

[sonny@localhost data]$ su root
Password:
[root@localhost data]# cat /proc/version #查看当前版本信息
Linux version 3.10.0-327.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu Nov 19 22:10:57 UTC 2015
[root@localhost data]# cat /etc/redhat-release  
CentOS Linux release 7.2.1511 (Core)
[root@localhost data]# vi /etc/redhat-release
[root@localhost data]# cat /etc/redhat-release #改完再确认一下
redhat-7  
4.安装oracle数据库所需要的软件包
重复一遍,我安装时Oracle Database 11g Release 2 64位数据库。
操作系统:Oracle Linux 7 and Red Hat Enterprise Linux 7

The following packages (or later versions) must be installed:
binutils-2.23.52.0.1-12.el7.x86_64
compat-libcap1-1.10-3.el7.x86_64
gcc-4.8.2-3.el7.x86_64
gcc-c+±4.8.2-3.el7.x86_64
glibc-2.17-36.el7.i686
glibc-2.17-36.el7.x86_64
glibc-devel-2.17-36.el7.i686
glibc-devel-2.17-36.el7.x86_64
ksh
libaio-0.3.109-9.el7.i686
libaio-0.3.109-9.el7.x86_64
libaio-devel-0.3.109-9.el7.i686
libaio-devel-0.3.109-9.el7.x86_64
libgcc-4.8.2-3.el7.i686
libgcc-4.8.2-3.el7.x86_64
libstdc+±4.8.2-3.el7.i686
libstdc+±4.8.2-3.el7.x86_64
libstdc+±devel-4.8.2-3.el7.i686
libstdc+±devel-4.8.2-3.el7.x86_64
libXi-1.7.2-1.el7.i686
libXi-1.7.2-1.el7.x86_64
libXtst-1.2.2-1.el7.i686
libXtst-1.2.2-1.el7.x86_64
make-3.82-19.el7.x86_64
sysstat-10.1.5-1.el7.x86_64

特别提示:.i686的依赖包按照宁杀错不放过的原则,全给它装上
[sonny@localhost data]$ su root
Password:
[root@localhost data]# yum install binutils
省略…
[root@localhost data]# yum -y install binutils-2.* compat-libstdc+±33* elfutils-libelf-0.* elfutils-libelf-devel-* gcc-4.* gcc-c+±4.* glibc-2.* glibc-common-2.* glibc-devel-2.* glibc-headers-2.* ksh-2* libaio-0.* libaio-devel-0.* libgcc-4.* libstdc+±4.* libstdc+±devel-4.* make-3.* sysstat-7.* unixODBC-2.* unixODBC-devel-2.* pdksh*
yum install *.rpm

5.关闭防火墙 CentOS 7.2默认使用的是firewall作为防火墙
[sonny@localhost /]$ su root
Password:
[root@localhost /]# systemctl status firewalld.service  #查看防火墙状态,运行中
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2016-04-07 18:54:29 PDT; 2h 20min ago
Main PID: 802 (firewalld)
CGroup: /system.slice/firewalld.service
└─802 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

Apr 07 18:54:25 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon…
Apr 07 18:54:29 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
[root@localhost /]# systemctl stop firewalld.service  #关闭防火墙
[root@localhost /]# systemctl status firewalld.service  #再次查看防火墙状态,发现已关闭
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Thu 2016-04-07 21:15:34 PDT; 9s ago
Main PID: 802 (code=exited, status=0/SUCCESS)

Apr 07 18:54:25 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon…
Apr 07 18:54:29 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Apr 07 21:15:33 localhost systemd[1]: Stopping firewalld - dynamic firewall daemon…
Apr 07 21:15:34 localhost systemd[1]: Stopped firewalld - dynamic firewall daemon.
[root@localhost /]# systemctl disable firewalld.service  #禁止使用防火墙(重启也是禁止的)
Removed symlink /etc/systemd/system/dbus-org.Fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
6.关闭selinux(需重启生效)
[root@localhost /]# vi /etc/selinux/config
[root@localhost /]# cat /etc/selinux/config

This file controls the state of SELinux on the system.

SELINUX= can take one of these three values:

enforcing - SELinux security policy is enforced.

permissive - SELinux prints warnings instead of enforcing.

disabled - No SELinux policy is loaded.

SELINUX=disabled #此处修改为disabled

SELINUXTYPE= can take one of three two values:

targeted - Targeted processes are protected,

minimum - Modification of targeted policy. Only selected processes are protected.

mls - Multi Level Security protection.

#SELINUXTYPE=targeted #此处注释掉

为啥要关闭selinux?因为selinux太高深,非专业人士搞不懂~~
7.修改内核参数
红色部分为添加代码
[sonny@localhost /]$ su root
Password:
[root@localhost /]# vi /etc/sysctl.conf
[root@localhost /]# cat /etc/sysct.conf
cat: /etc/sysct.conf: No such file or directory
[root@localhost /]# cat /etc/sysctl.conf

System default settings live in /usr/lib/sysctl.d/00-system.conf.

To override those settings, enter new settings here, or in an /etc/sysctl.d/.conf file

For more information, see sysctl.conf(5) and sysctl.d(5).

net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.conf.all.rp_filter = 1
fs.file-max = 6815744
fs.aio-max-nr = 1048576
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

使配置参数生效
[root@localhost /]# sysctl -p
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.conf.all.rp_filter = 1
sysctl: setting key “fs.file-max”: Invalid argument
fs.file-max = 6815744 #设置最大打开文件数
fs.aio-max-nr = 1048576
sysctl: setting key “kernel.shmall”: Invalid argument
kernel.shmall = 2097152 #共享内存的总量,8G内存设置:2097152*4k/1024/1024
sysctl: setting key “kernel.shmmax”: Invalid argument
kernel.shmmax = 2147483648 #最大共享内存的段大小
sysctl: setting key “kernel.shmmni”: Invalid argument
kernel.shmmni = 4096 #整个系统共享内存端的最大数
kernel.sem = 250 32000 100 128
sysctl: setting key “net.ipv4.ip_local_port_range”: Invalid argument
net.ipv4.ip_local_port_range = 9000 65500 #可使用的IPv4端口范围
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
8.对oracle用户设置限制,提高软件运行性能(红色为添加部分)
[sonny@localhost /]$ su root
Password:
[root@localhost /]# vi /etc/security/limits.conf
[root@localhost /]# cat /etc/security/limits.conf

/etc/security/limits.conf

#This file sets the resource limits for the users logged in via PAM.
#It does not affect resource limits of the system services.

#Also note that configuration files in /etc/security/limits.d directory,
#which are read in alphabetical order, override the settings in this
#file in case the domain is the same or more specific.
#That means for example that setting a limit for wildcard domain here
#can be overriden with a wildcard setting in a config file in the
#subdirectory, but a user specific setting here can be overriden only
#with a user specific setting in the subdirectory.

#Each line describes a limit for a user in the form:

#

#Where:
# can be:

- a user name

- a group name, with @group syntax

- the wildcard *, for default entry

- the wildcard %, can be also used with %group syntax,

for maxlogin limit

# can have the two values:

- “soft” for enforcing the soft limits

- “hard” for enforcing hard limits

# can be one of the following:

- core - limits the core file size (KB)

- data - max data size (KB)

- fsize - maximum filesize (KB)

- memlock - max locked-in-memory address space (KB)

- nofile - max number of open file descriptors

- rss - max resident set size (KB)

- stack - max stack size (KB)

- cpu - max CPU time (MIN)

- nproc - max number of processes

- as - address space limit (KB)

- maxlogins - max number of logins for this user

- maxsyslogins - max number of logins on the system

- priority - the priority to run user process with

- locks - max number of file locks the user can hold

- sigpending - max number of pending signals

- msgqueue - max memory used by POSIX message queues (bytes)

- nice - max nice priority allowed to raise to values: [-20, 19]

- rtprio - max realtime priority

#

#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

End of file

[root@localhost /]#  
9.配置用户的环境变量(红色部分为添加代码)
[root@localhost /]# vi /home/oracle/.bash_profile
[root@localhost /]# cat /home/oracle/.bash_profile

.bash_profile

Get the aliases and functions

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

User specific environment and startup programs

PATH= P A T H : PATH: PATH:HOME/.local/bin:$HOME/bin

export PATH

export ORACLE_BASE=/data/oracle #oracle数据库安装目录
export ORACLE_HOME=KaTeX parse error: Expected 'EOF', got '#' at position 33: …ct/11.2.0/db_1 #̲oracle数据库路径 exp…ORACLE_HOME/bin:/usr/sbin:KaTeX parse error: Expected 'EOF', got '#' at position 6: PATH #̲添加系统环境变量 export…ORACLE_HOME/lib:/lib:/usr/lib #添加系统环境变量
export LANG=C #防止安装过程出现乱码
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK #设置Oracle客户端字符集,必须与Oracle安装时设置的字符集保持一致,如:ZHS16GBK,否则出现数据导入导出中文乱码问题 
使上述配置立即生效:
[oracle@localhost /]$ su root
Password:
[root@localhost /]# source /home/oracle/.bash_profile
10.上述都搞定了,上传安装包我喜欢xftp,将oracle安装包上传到/usr/local/src

11.解压安装包
[oracle@localhost /]$ cd /usr/local/src  #进入/usr/local/src目录
[oracle@localhost src]$ ls
linux.x64_11gR2_database_1of2.zip linux.x64_11gR2_database_2of2.zip
[oracle@localhost src]$ unzip linux.x64_11gR2_database_1of2.zip -d /data/database/  #解压
(省略…)
[oracle@localhost src]$ unzip linux.x64_11gR2_database_2of2.zip -d /data/database/  #解压
(省略…)
[root@localhost src]# chown -R oracle:oinstall /data/database/database/
#更改解压后文件夹的所有人为oracle系统用户
三、oracle安装 
1.图形界面登陆oracle用户:

2.启动oralce安装,到/data/database/database/目录下,执行runInstaller
./runInstaller.sh

3.Configure Security Updates,取消勾选I wish to receive…。
4.Select Installation Option,保持默认设定Create and configure a database.
5.System Class,选择Server Class。

6.Node Selection,选择Single instance database installation。
7.Select Install Type,选择Advanced Install

8.Select Product Languages,选择需要添加的语言,这里直接下一步。

9.Select Database Edition,选择Enterprise Edition。

10.Specify Installation Location,由于之前已经配置了环境变量,直接下一步

11.Create Inventory,直接下一步。

12.Select Configuration Type,下一步。

13.Specity Database Identifiers。

14.Specify Configuration Options

15.Specify Management Options。

16.Specify Database Storage Options。

17.Specify Recovery Options。

18.Specify Schema Passwords,这里可以选Use the same password for all accounts,这里的所有用户应该是管理员层面的用户而非普通用户;设定密码时一定要设一个稍微复杂点的,否则会提示The password entered does not conform to the Oracle recommended standards甚至无法继续进行安装。

19.Privileged Operating System Groups。

20.Perform Prerequisite Checks,如果前面的配置有哪个有问题,这里都会检测出来

[root@localhost oracle]# dd if=/dev/zero of=/home/swap bs=1024 count=1024000  #将当前swap空间由2048M 增加到 3048M 新增一个2014的swap文件
1024000+0 records in
1024000+0 records out
1048576000 bytes (1.0 GB) copied, 29.4051 s, 35.7 MB/s
[root@localhost oracle]# mkswap /home/swap
Setting up swapspace version 1, size = 1023996 KiB
no label, UUID=5e3d39d7-285e-4c74-b321-1e2b3ffabf83
[root@localhost oracle]# free -m
total used free shared buff/cache available
Mem: 1824 1275 95 10 454 342
Swap: 2048 141 1907
[root@localhost oracle]# swapon /home/swap  #增加并启用虚拟内容
swapon: /home/swap: insecure permissions 0644, 0600 suggested.
[root@localhost oracle]# free -m  #再次查看
total used free shared buff/cache available
Mem: 1824 1275 94 10 454 342
Swap: 3048 141 2907 
11.一个一个检查package,在准备阶段中漏掉的,此处再安装,有些系统报错是因为现有的包的版本比检测要高,最后忽略即可。(点击Check_Again 多检查几次)

12.准备完毕,fuck “Finish”开始安装。

13.安装过程是一个漫长的过程,中间有几次卡住,没有出现任何画面,屏幕中间有条小线,这是分辨率的问题(建议用Xshell远程连接服务器,这样可以看到里面的提示内容),内容提示了两个错误信息需要手动修改:
安装oracle过程中在68%出现Error in invoking target “install” of makefile 的问题:–查看日志之后反馈结果:
–INFO: /lib64/libstdc++.so.5: undefined reference to `memcpy@GLIBC_2.14’
–INFO: collect2: error: ld returned 1 exit status
–INFO: make: * [ctxhx] Error 1
–网上说是glibc的版本2.17过高所致(高于2.14)。
–解决办法:安装 glibc-static
yum install glibc-static
–该软件包包含一个静态链接库:/usr/lib64/libc.a
–修改/data/oracle/product/11.2.0/db_1/ctx/lib/ins_ctx.mk
ctxhx: $(CTXHXOBJ)
$(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK)
–修改为:
ctxhx: $(CTXHXOBJ)
-static $(LINK_CTXHX) ( C T X H X O B J ) (CTXHXOBJ) (CTXHXOBJ)(INSO_LINK) /usr/lib64/libc.a
–点击Retry继续安装。
–又提示”Error in invoking target ‘agent nmhs’ of makefile 。。。的问题:
–解决方法:在makefile中添加链接libnnz11库的参数
–修改/data/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk
–找到
$(SYSMANBIN)emdctl:
$(MK_EMAGENT_NMECTL)
–修改为:
$(SYSMANBIN)emdctl:
$(MK_EMAGENT_NMECTL) -lnnz11
–点击Retry继续安装。

过一会儿手动执行两个文件./orainstRoot.sh和./root.sh 系统会给路径,root.sh执行完后会生成一个oratab文件 
14.提示安装成功。

四、配置监听listener
1.执行netca 报错
[Oracle@localhost ~]$ netca

Oracle Net Services Configuration:

An unexpected error has been detected by HotSpot Virtual Machine:

SIGSEGV (0xb) at pc=0x00007f69a69fcb9d, pid=8033, tid=140092892297024

Java VM: Java HotSpot™ 64-Bit Server VM (1.5.0_17-b03 mixed mode)

Problematic frame:

C [libclntsh.so.11.1+0x62ab9d] snlinGetAddrInfo+0x1b1

An error report file with more information is saved as hs_err_pid8033.log

If you would like to submit a bug report, please visit:

http://java.sun.com/webapps/bugreport/crash.jsp

/data/oracle/product/11.2.0/db_1/bin/netca: line 178: 8033 Aborted (core dumped) $JRE $JRE_OPTIONS -classpath $CLASSPATH oracle.net.ca.NetCA ∗ [ o r a c l e @ l o c a l h o s t   ] * [oracle@localhost ~] [oracle@localhost ]  
错误原因:安装操作系统是默认主机名localhost造成错误
解决办法:
racle]# cat /etc/sysconfig/network

Created by anaconda

[root@localhost oracle]# vi /etc/sysconfig/network  #增加HOSTNAME
[root@localhost oracle]# cat /etc/sysconfig/network

Created by anaconda

HOSTNAME=odb-sonny
[root@localhost oracle]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
[root@localhost oracle]# vi /etc/hosts  #增加HOSTNAME
[root@localhost oracle]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 odb-sonny
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
[root@localhost oracle]# hostname odb-sonny  #执行
[root@localhost oracle]#  
最后注销当前oracle用户,重新登陆即可!!这次发现打开配置界面正常,安装windows下面配置即可。
[root@localhost oracle]# netca
创建数据库监听器

yes

配置另一监听器

填入你的主机IP

最终finish

五、创建Oracle数据实例Orcl
执行dbca命令,启动oracle实例安装界面,剩下的与Windows上安装一样,不废话了:
注意:必须先创建监听,并且监听是启动中,否则报错。安装过程中需要根据要求选择字符集,不要选错

六、设置oracle开机自启
–root登录
–1.配置oratab文件
vi /etc/oratab --编辑这个文件
orcl:/data/oracle/product/11.2.0/db_1:N --找到这一句然后对着一具进行修改
orcl:/data/oracle/product/11.2.0/db_1:Y --将N改成Y
–2.配置/etc/rc.d/rc.local文件
su oracle -lc “/data/oracle/product/11.2.0/db_1/bin/lsnrctl start” --添加这一行,带双引号
su oracle -lc /data/oracle/product/11.2.0/db_1/bin/dbstart --这个可以不加引号
–3.看一下/etc/rc.d/rc.local的权限
ll /etc/rc.d/rc.local --查看这个文件的权限
-rw-r–r-- 1 root root 484 Oct 11 17:17 /etc/rc.d/rc.local --反馈的rc.local这个文件的权限
–4.给它一个可执行运行的权限
chmod +x /etc/rc.d/rc.local
–5.重启
reboot --重启
–6.查看开机自启的结果
lsnrctl status

–7.实践发现还有另一种开机自启的方法也写在下面,脚本自启
vi /etc/init.d/oracle 导入oracle自启动脚本文件
chmod a+x /etc/init.d/oracle 给它一个可执行权限
chkconfig --add oracle 注册服务
chkconfig oracleon 开机自启
–Oracle安装过程中问题解决方案
–1.安装oracle之前检测以来报的时候出现的众多Failed问题:
–重新编译32位RPM包为i686架构的装上就可以检测到了。
–默认安装的gcc/g++都是用来编译64位代码的。
–对于那些使用32位库的程序来说,用此gcc/g++编译会出问题。我遇到的就是缺少gun/stab.h32位文件。
–遇到这样的问题,只能手动安装32位的库文件。
Rpm -ivh glibc-devel.i686 glibc.i686 --用 yum install glibc-devel.i686 glibc.i686试试
–编译命令,用target 参数指定要编译成的CPU架构,如下:
rpmbuild -ba rpmbuild/SPECS/libaio.spec –target i36

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值