Checking operating system version: must be redhat-3, SuSE-9, redhat-4解决方法

[oracle@red1 database]$ ls
doc  install  response  runInstaller  stage  welcome.html
[oracle@red1 database]$ ./runInstaller 
Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
                                      Failed <<<<

Exiting Oracle Universal Installer, log for this session can be found at /tmp/OraInstall2013-08-10_10-22-10PM/installActions2013-08-10_10-22-10PM.log
[oracle@red1 database]$ 


出现这个错误时, 可以加上 -ignoreSysPrereqs 参数.

启动Oracle CRS安装脚本,注意参数-ignoreSysPrereqs是为了忽略版本检查带来的错误


[oracle@red1 database]$ ./runInstaller -ignoreSysPrereqs
Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
                                      Failed <<<<


>>> Ignoring required pre-requisite failures. Continuing...

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2013-08-10_10-30-24PM. Please wait ...[oracle@red1 database]$ Oracle Universal Installer, Version 10.2.0.1.0 Production
Copyright (C) 1999, 2005, Oracle. All rights reserved.



### 关于 ccache 版本检查错误的解决方案 ccache 是一个用于加速软件编译过程的工具,它通过缓存编译器的结果来减少重复编译的时间。当执行 `ccache.exe --version` 命令失败时,通常可能涉及以下几个方面的问题:环境配置、路径问题或安装不完整。 #### 1. 检查 ccache 是否正确安装 确保 ccache 已正确安装在系统中。可以通过以下命令验证: ```bash which ccache ``` 如果返回为空,则说明 ccache 未正确安装或未添加到系统的 PATH 环境变量中[^5]。此时需要重新安装 ccache 或调整 PATH 配置。 #### 2. 检查 PATH 环境变量 即使 ccache 已安装,但如果其可执行文件所在的目录未包含在 PATH 中,也会导致命令无法识别。可以运行以下命令检查: ```bash echo $PATH ``` 确认 ccache 的安装路径(如 `/usr/bin/ccache` 或其他自定义路径)是否包含在 PATH 中。如果未包含,可以通过以下方式临时或永久添加: - **临时添加**: ```bash export PATH=$PATH:/path/to/ccache ``` - **永久添加**:将上述 `export` 命令添加到用户的 `.bashrc` 或 `.zshrc` 文件中。 #### 3. 验证 ccache 版本命令 如果 PATH 配置无误但命令仍然失败,可能是 ccache 的版本或二进制文件存在问题。尝试直接运行以下命令以验证: ```bash /usr/bin/ccache --version ``` 如果该命令成功输出版本信息,则表明问题是由于 PATH 配置引起的;否则可能是 ccache 本身损坏或不兼容[^6]。 #### 4. 检查 ccache 配置文件 ccache 的行为由其配置文件控制,通常位于 `~/.ccache/ccache.conf` 或系统级配置文件中。某些配置可能导致版本命令异常。检查以下关键配置项: - `max_size`:缓存的最大大小。 - `run_second_cpp`:是否启用第二阶段预处理器。 如果发现异常配置,可以尝试重置配置文件: ```bash rm -rf ~/.ccache/ccache.conf ccache --zero-stats ``` #### 5. 升级或重新安装 ccache 如果上述方法均无效,可能是当前版本的 ccache 存在 bug 或与系统环境不兼容。可以尝试升级或重新安装 ccache: - **使用包管理器**: ```bash sudo apt update && sudo apt install --reinstall ccache ``` - **从源码编译**: 如果需要最新版本,可以从源码编译安装。参考以下步骤: ```bash git clone https://github.com/ccache/ccache.git cd ccache mkdir build && cd build cmake .. make -j$(nproc) sudo make install ``` #### 6. 其他可能原因 如果问题仍未解决,可能是系统环境中存在冲突的工具或库。例如,某些编译工具链可能覆盖了默认的 ccache 行为。可以通过以下方式排查: - 使用 `strace` 跟踪命令执行过程: ```bash strace -f -o ccache.log ccache --version ``` - 检查日志文件 `ccache.log`,定位具体错误原因。 --- ### 示例代码 以下是一个简单的脚本,用于自动化检查和修复 ccache 版本命令的问题: ```bash #!/bin/bash # 检查 ccache 是否存在 if ! command -v ccache &> /dev/null; then echo "ccache 未安装,请先安装!" exit 1 fi # 检查版本命令是否正常 if ! ccache --version &> /dev/null; then echo "ccache --version 命令失败,尝试修复..." # 重置配置 rm -rf ~/.ccache/ccache.conf ccache --zero-stats # 检查是否修复 if ! ccache --version &> /dev/null; then echo "修复失败,请检查安装或升级 ccache!" exit 1 fi fi echo "ccache 版本检查成功!" ``` ---
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值