安装MySQL之前尝试安装libnuma1

This commit is contained in:
GoEdgeLab
2024-05-12 08:56:28 +08:00
parent 3f042dd2b0
commit d6fdd9cd16

View File

@@ -90,7 +90,7 @@ func (this *MySQLInstaller) InstallFromFile(xzFilePath string, targetDir string)
// ubuntu apt // ubuntu apt
aptGetExe, err := exec.LookPath("apt-get") aptGetExe, err := exec.LookPath("apt-get")
if err == nil && len(aptGetExe) > 0 { if err == nil && len(aptGetExe) > 0 {
for _, lib := range []string{"libaio1", "libncurses5"} { for _, lib := range []string{"libaio1", "libncurses5", "libnuma1"} {
this.log("checking " + lib + " ...") this.log("checking " + lib + " ...")
var cmd = utils.NewCmd(aptGetExe, "-y", "install", lib) var cmd = utils.NewCmd(aptGetExe, "-y", "install", lib)
cmd.WithStderr() cmd.WithStderr()
@@ -105,9 +105,13 @@ func (this *MySQLInstaller) InstallFromFile(xzFilePath string, targetDir string)
} }
if err != nil { if err != nil {
if lib == "libnuma1" {
err = nil
} else {
return errors.New("install " + lib + " failed: " + cmd.Stderr()) return errors.New("install " + lib + " failed: " + cmd.Stderr())
} }
} }
}
time.Sleep(1 * time.Second) time.Sleep(1 * time.Second)
} }
} else { // yum } else { // yum