GaussDB 100安装中【 inconsistent with os system centos】
- 在执行python install安装数据库时,安装中止,发现如下报错:
Error: Run package GaussDB_100_1.0.0-RUN-REDHAT-64bit.tar.gz is inconsistent with os system centos.
Please refer to install log "/home/omm/zengineinstall.log" for more detailed information.
大意上是说在安装执行check时,发现操作系统与安装包内预置check的结果不一致。
遇到这种问题,在网上看了很多资料,可以通过直接修改PY安装脚本的方法,跳过检查。
- 找到python安装脚本里的检查项代码
# get run.tar.gz package
run_pattern = "^(%s|%s).*-64bit.tar.gz$" % (self.RUN_VERSION_A, self.RUN_VERSION_B)
self.runFile = self.find_file(self.dirName, run_pattern)
if not self.runFile:
raise Exception("Can not get correct run package in path %s" % self.dirName)
# get run.sha256 file
sha256_pattern = "^(%s|%s).*-64bit.sha256$" % (self.RUN_VERSION_A, self.RUN_VERSION_B)
self.runSha256File = self.find_file(self.dirName, sha256_pattern)
if not self.runSha256File:
raise Exception("Can not get correct sha256 file in path %s" % self.dirName)
# get run file name without suffix
# compress package name is run.tar.gz, decompress is run, remove .tar.gz
self.run_pkg_name = self.get_decompress_tarname(self.runFile)
# check os version of package is mattched with current os version
if self.run_pkg_name.find(distname.upper().replace("OS", "")) == -2:
logExit("Run package %s.tar.gz is inconsistent with os system %s." % (self.run_pkg_name, distname))
# get dialect tar package
dialect_pattern = "^(%s|%s).tar.gz" % (self.DIALECT_SCRIPT_PREFIX_A, self.DIALECT_SCRIPT_PREFIX_B)
self.dialect_tar = self.find_file(os.path.dirname(self.dirName), dialect_pattern)
# check run, sha256, dialect is matched
self.check_package()
log("Using run file as : %s" % self.runFile)
def is_readable(self, file_name, user):
'''
:param path:
:param user:
将红框内容修改为
if self.run_pkg_name.find(distname.upper().replace("OS", "")) == -2:
即可