Skip to content

Commit d6fdd9c

Browse files
committed
安装MySQL之前尝试安装libnuma1
1 parent 3f042dd commit d6fdd9c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

internal/web/actions/default/setup/mysql/mysqlinstallers/mysql_installer.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func (this *MySQLInstaller) InstallFromFile(xzFilePath string, targetDir string)
9090
// ubuntu apt
9191
aptGetExe, err := exec.LookPath("apt-get")
9292
if err == nil && len(aptGetExe) > 0 {
93-
for _, lib := range []string{"libaio1", "libncurses5"} {
93+
for _, lib := range []string{"libaio1", "libncurses5", "libnuma1"} {
9494
this.log("checking " + lib + " ...")
9595
var cmd = utils.NewCmd(aptGetExe, "-y", "install", lib)
9696
cmd.WithStderr()
@@ -105,7 +105,11 @@ func (this *MySQLInstaller) InstallFromFile(xzFilePath string, targetDir string)
105105
}
106106

107107
if err != nil {
108-
return errors.New("install " + lib + " failed: " + cmd.Stderr())
108+
if lib == "libnuma1" {
109+
err = nil
110+
} else {
111+
return errors.New("install " + lib + " failed: " + cmd.Stderr())
112+
}
109113
}
110114
}
111115
time.Sleep(1 * time.Second)

0 commit comments

Comments
 (0)