这是我安装oracle时遇到的错误,再此汇总一下和大家交流分享经验。
------------------------------------------------------------------------------------------------
1、/downloads/database/install/.oui: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
解决: yum install y ld-linux.so.2
2、The user is root. Oracle Universal Installer cannot continue installation if the user is root.
解决:用oracle用户登陆执行
3、Checking swap space: 0 MB available, 150 MB required. Failed
解决:dd if=/dev/zero of=/data/swap bs=1G count=18
mkswap /data/swap && swapon /data/swap
vim /etc/fstab (add)
/data/swap swap swap defaults 0 0
mount -a
4、Checking monitor: must be configured to display at least 256 colorsChecking monitor: must configured to display at least 256 colors
解决:yum whatprovides "*/xhost" 根据查出来的包,安装,类似
yum install -y xorg-x11-server-utils-7.7-14.el7 (x11的实现,当底层运转时,连接到x server上)
5、xhost: unable to open display ""
解决:yum install tigervnc-server (vnc服务可以通过字符终端登录图形界面)
(root)vncserver && 输入密码 && export DISPLAY=localhost:1
(oracle)vncserver && 输入密码
启动vnc之后,还是无法解决上面显示问题,我又开始查,
http://www.jb51.net/LINUXjishu/412923.html
xhost + (让所有IP可以介入)
yum install xdpyinfo //自动检索系统中的color
执行 xdpyinfo |grep name //然后在oracle设置打印出的 DISPLAY变量,类似下面
6、Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2017-03-13_09-56-31AM/jdk/jre/lib/i386/xawt/libmawt.so: libXext.so.6: cannot open shared object file: No such file or directory
解决:yum install libXext.i686 (oracle需要一些32位的lib)
7、无法登陆vnc客户端
登录方式1:只是登录方式不是 ip:port 而是 ip:1 ip:2 1和2 会话号 可以ps vnc看到
登录方式2:web端,输入 ip:port,之后输入 ip:1,密码登录
启动:vncserver :1 (会话号)
关闭:vncserver -kill :1 vncserver -kill :2 (只能在各自用户下杀死自己的)
修改密码:vncpasswd :1
8、This is a prerequisite condition to test whether the system certified architecture.?)
Expected Value :x86
Actual Value:x86_64
解决:意思是系统是64位的,oracle使用的32位的,不匹配,虽然可以用一些补丁解决,但是为了以后能正常使用,还是下一个64位的吧。
9、This is a prere condition to test whether the OS kernel parameter "semmni" is properly set.?)
Expected Value:128
Actual Value:0
解决:首先检索你的/etc/sysctl.conf有没有设置sem,如果设置了,直接跳过就好,oracle没有识别到。
10、packge:pdksh-5.2.14
解决:wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/pdksh-5.2.14-37.el5_8.1.x86_64.rpm 64位的
wget ftp://rpmfind.net/linux/opensuse/distribution/13.1/repo/oss/suse/i586/pdksh-5.2.14-948.1.2.i586.rpm 32位的
rpm -ivh pdksh-5.2.14-37.el5_8.1.x86_64.rpm --force --nodeps
11、error while loading shared libraries: libclntsh.so.11.1:
error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
解决:首先我们可以 ldd sqlplus 查看sqlplus软链的库文件是如何寻找的
之后find 这个库,根据ldd查找的路径,做个软链即可。
12、
解决:wget http://install.com:8888/unixODBC-2.2.11-7.1.i386.rpm
rpm -ivh --force unixODBC-2.2.11-7.1.i386.rpm
wget http://mirror.centos.org/centos/5/os/i386/CentOS/unixODBC-devel-2.2.11-10.el5.i386.rpm
rpm -ivh unixODBC-devel-2.2.11-10.el5.i386.rpm --nodeps --force
wget ftp://ftp.pbone.net/mirror/www.whiteboxlinux.org/whitebox/4/en/updates/i386/libstdc++-3.4.6-11.i386.rpm
rpm -ivh libstdc++-3.4.6-11.i386.rpm --force
wget ftp://bo.mirror.garr.it/1/smeserver/releases/obsolete/7.1/smeos/i386/CentOS/RPMS/libgcc-3.4.6-3.i386.rpm
wget ftp://ftp.pbone.net/mirror/www.whiteboxlinux.org/whitebox/4/en/updates/i386/libaio-devel-0.3.105-2.i386.rpm
rpm -ivh libaio-devel-0.3.105-2.i386.rpm --force
wget ftp://ftp.muug.mb.ca/mirror/centos/5.11/os/i386/CentOS/compat-libstdc++-33-3.2.3-61.i386.rpm
rpm -ivh compat-libstdc++-33-3.2.3-61.i386.rpm --force
wget ftp://ftp.pbone.net/mirror/www.whiteboxlinux.org/whitebox/4/en/updates/i386/libaio-0.3.105-2.i386.rpm
rpm -ivh libaio-0.3.105-2.i386.rpm --force
13、修复选项无法点击
去日志文件中,/tmp/OraInstallxxxxx9-07PM/installActions2xxxxxx-07PM.log
中,搜索Error,或查找fixup,会发现下面这个文件所属主变了,应该是删除用户时变得。
chown -R oraclll /tmp/CVU_11.2.0.1.0_oracle/
14、ORA-12162: TNS:net service name is incorrectly specified:
因为是其他用户登录,没有设置sid,export ORACLE_SID=xxx 即可
15、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),解决办法:下载下面包,该软件包包含一个静态链接库:/usr/lib64/libc.a
wget http://vault.centos.org/7.3.1611/updates/Source/SPackages/glibc-2.17-157.el7_3.1.src.rpm
wget ftp://rpmfind.net/linux/centos/7.3.1611/os/x86_64/Packages/glibc-static-2.17-157.el7.x86_64.rpm
rpm -ivh glibc-2.17-157.el7_3.1.src.rpm
rpm -ivh glibc-static-2.17-157.el7.x86_64.rpm
修改 /usr/local/oracle/ctx/lib/ins_ctx.mk ,将
ctxhx: $(CTXHXOBJ)
$(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK)
修改为:
ctxhx: $(CTXHXOBJ)
-static $(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK) /usr/lib64/stdc.a
点击Retry继续安装。
16、Error in invoking target 'agent nmhs' of makefile '/usr/local/oracle/sysman/lib/ins_emagent.mk .'
解决方法:在makefile中添加链接libnnz11库的参数
修改/u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk,将
$(MK_EMAGENT_NMECTL)修改为:$(MK_EMAGENT_NMECTL) -lnnz11
点击Retry继续安装。
安装成功!
17、
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/usr/local/oracle/dbs/initORCL2.ora'
首先确定你的 数据库启动时的oracle_sid是否设置的是ORCL2,不是的话更改 env。
检验方式:$ORACLE_BASE//admin/orasid == orasid 即你启动时的sid
18、客户端pl登录 Database character set (AL32UTF8) and Client character set (ZHS16GBK) are different. Character set conversion may cause unexpected results.
Note: you can set the client character set through the NLS_LANG environment variable or the NLS_LANG registry key in HKEY_LOCAL_MACHINESOFTWAREORACLEKEY_Oracle_10
查看服务端字符集:select userenv('language') from dual;
打开cmd,命令regedit打开注册表。找到到文中提示的路径,发现NLS_LANG键的值为:
SIMPLIFIED CHINESE_CHINA.ZHS16GBK
修改为:SIMPLIFIED CHINESE_CHINA.AL32UTF8或 SIMPLIFIED AMERICAN_AMERICA.AL32UTF8
还有一种可能是由于安装11g的时候没选择自定义安装造成的
Database character set (AL32UTF8) and Client character set (ZHS16GBK) are different. Character set conversion may cause unexpected results. Note: you can set the client character set through the NLS_LANG environment variable or the NLS_LANG registry key in HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/KEY_OraDb11g_home
SIMPLIFIED CHINESE_CHINA.ZHS16GBK 包含 AMERICAN_AMERICA.AL32UTF8.
这可是个麻烦事,不是改客户端字符集的问题。要改数据库的字符集:
SQL> conn /as sysdba
SQL> shutdown immediate;
SQL> startup mount
SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION;
SQL> ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
SQL> ALTER SYSTEM SET AQ_TM_PROCESSES=0;
SQL> alter database open;
SQL> ALTER DATABASE CHARACTER SET ZHS16GBK;
ORA-12712: new character set must be a superset of old character set 提示我们的字符集:新字符集必须为旧字符集的超集,这时我们可以跳过超集的检查做更改: SQL> ALTER DATABASE character set INTERNAL_USE ZHS16GBK;
--我们看到这个过程和之前ALTER DATABASE CHARACTER SET操作的内部过程是完全相同的,
也就是说INTERNAL_USE提供的帮助就是使Oracle数据库绕过了子集与超集的校验.
SQL> select * from v$nls_parameters;
SQL> shutdown immediate;
SQL> startup
SQL> select * from v$nls_parameters;
以后安装oracle11g的时候记得选择自定义安装,把这个字符集的事情事先弄好
===========================================================================================
转载于:https://blog.51cto.com/tengxiansheng/1912676