From f293304eec803fa44ac4852e1616894b343f804c Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Thu, 26 Jun 2025 18:11:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0rpm=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E5=91=BD=E4=BB=A4=EF=BC=8C=E6=B7=BB=E5=8A=A0--nosignature?= =?UTF-8?q?=E3=80=81--nodeps=E5=92=8C--replacepkgs=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/network_element/service/ne_version.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/network_element/service/ne_version.go b/src/modules/network_element/service/ne_version.go index 74ecc3ae..793e6663 100644 --- a/src/modules/network_element/service/ne_version.go +++ b/src/modules/network_element/service/ne_version.go @@ -240,7 +240,7 @@ func (r NeVersion) operateCommand(action, neType string, neFilePaths []string) ( pkgCmdStr := fmt.Sprintf("sudo dpkg -i %s", strings.Join(neFilePaths, " ")) fileExt := filepath.Ext(strings.ToLower(neFilePaths[0])) if strings.HasSuffix(fileExt, "rpm") { - pkgCmdStr = fmt.Sprintf("sudo rpm -Uvh --reinstall %s", strings.Join(neFilePaths, " ")) + pkgCmdStr = fmt.Sprintf("sudo rpm -Uvh --nosignature --nodeps --replacepkgs %s", strings.Join(neFilePaths, " ")) } // 组合命令输入 @@ -258,7 +258,7 @@ func (r NeVersion) operateCommand(action, neType string, neFilePaths []string) ( // 升级软件包 pkgCmdStr = fmt.Sprintf("sudo dpkg -i %s", strings.Join(neFilePaths, " ")) if strings.HasSuffix(fileExt, "rpm") { - pkgCmdStr = fmt.Sprintf("sudo rpm -Uvh --reinstall %s", strings.Join(neFilePaths, " ")) + pkgCmdStr = fmt.Sprintf("sudo rpm -Uvh --nosignature --nodeps --replacepkgs %s", strings.Join(neFilePaths, " ")) } omcStrArr = append(omcStrArr, pkgCmdStr) }