macos – 如何在Mac OS X 10.7 Lion上安装IBM DB2 Express-C?

我能够安装和使用IBM DB2 Express-C 9.5.2.在Mac OS X Snow Leopard中测试没有任何问题.但是,在Mac OS X 10.7 Lion中,使用db2setup脚本的安装失败了:

DBI1189E There has been an attempt to use db2setup on an image for a platform that does not match the current platform ‘Darwin [x86_64]’ on which it is being run.

我如何解决这个问题,在Lion上安装DB2 Express-C?

编辑:移动答案的答案

最佳答案
问题是db2setup脚本无法正确识别报告的x86_64体系结构

uname -m

要使安装脚本正常工作,请编辑db2setup脚本并更改以下内容:

"Darwin")
    case ${OSM?} in
      i*86)
        INSTALLDIR="${PROGDIR?}/db2/macos/install"
        PLATNAME="MacOS" ;;
    esac ;;
"HP-UX")

对此:

"Darwin")
    case ${OSM?} in
      i*86)
          INSTALLDIR="${PROGDIR?}/db2/macos/install"
          PLATNAME="MacOS" ;;
      x86_64)
          INSTALLDIR="${PROGDIR?}/db2/macos/install"
          PLATNAME="MacOS/x86_64" ;;
    esac ;;
"HP-UX")

现在运行db2setup.该脚本应该识别该体系结构并继续正常安装.

转载注明原文:macos – 如何在Mac OS X 10.7 Lion上安装IBM DB2 Express-C? - 代码日志