From 78a783479758ebe9f35365340d26c0c81beac12a Mon Sep 17 00:00:00 2001 From: xumia Date: Fri, 6 Jan 2023 02:06:56 +0000 Subject: [PATCH 1/2] [Bug] Fix SONiC installation failure caused by pip/pip3 not found --- .../services/platform_api/platform_api_mgnt.sh | 1 + .../as7116-54x/service/platform_api/platform_api_mgnt.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/platform/broadcom/sonic-platform-modules-cel/services/platform_api/platform_api_mgnt.sh b/platform/broadcom/sonic-platform-modules-cel/services/platform_api/platform_api_mgnt.sh index 0f648246ad33..8ef17dc6712c 100755 --- a/platform/broadcom/sonic-platform-modules-cel/services/platform_api/platform_api_mgnt.sh +++ b/platform/broadcom/sonic-platform-modules-cel/services/platform_api/platform_api_mgnt.sh @@ -5,6 +5,7 @@ DEVICE="/usr/share/sonic/device" PLATFORM=$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform) FILES=$DEVICE/$PLATFORM/api_files PY3_PACK=$DEVICE/$PLATFORM/sonic_platform-1.0-py3-none-any.whl +export PATH=$PATH:/usr/local/bin install() { # Install python3 sonic-platform package diff --git a/platform/nephos/sonic-platform-modules-accton/as7116-54x/service/platform_api/platform_api_mgnt.sh b/platform/nephos/sonic-platform-modules-accton/as7116-54x/service/platform_api/platform_api_mgnt.sh index e1d330357894..d04e9f32993e 100755 --- a/platform/nephos/sonic-platform-modules-accton/as7116-54x/service/platform_api/platform_api_mgnt.sh +++ b/platform/nephos/sonic-platform-modules-accton/as7116-54x/service/platform_api/platform_api_mgnt.sh @@ -4,6 +4,7 @@ PREV_REBOOT_CAUSE="/host/reboot-cause/" DEVICE="/usr/share/sonic/device" PLATFORM=$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform) FILES=$DEVICE/$PLATFORM/api_files +export PATH=$PATH:/usr/local/bin install() { # Install sonic-platform package From 72d0070067857d6e259b4a207e71a2d97d80e7c0 Mon Sep 17 00:00:00 2001 From: xumia Date: Fri, 6 Jan 2023 02:44:15 +0000 Subject: [PATCH 2/2] Fix the missing ones --- .../aurora-610/utils/netberg_nba610_platform.sh | 1 + .../aurora-715/utils/netberg_nba715_platform.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/platform/barefoot/sonic-platform-modules-netberg/aurora-610/utils/netberg_nba610_platform.sh b/platform/barefoot/sonic-platform-modules-netberg/aurora-610/utils/netberg_nba610_platform.sh index a5e61d83b494..ebcb9c876c27 100755 --- a/platform/barefoot/sonic-platform-modules-netberg/aurora-610/utils/netberg_nba610_platform.sh +++ b/platform/barefoot/sonic-platform-modules-netberg/aurora-610/utils/netberg_nba610_platform.sh @@ -3,6 +3,7 @@ # Install Netberg Aurora python package DEVICE="/usr/share/sonic/device" PLATFORM=$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform) +export PATH=$PATH:/usr/local/bin if [ -e $DEVICE/$PLATFORM/sonic_platform-1.0-py3-none-any.whl ]; then pip install $DEVICE/$PLATFORM/sonic_platform-1.0-py3-none-any.whl diff --git a/platform/innovium/sonic-platform-modules-netberg/aurora-715/utils/netberg_nba715_platform.sh b/platform/innovium/sonic-platform-modules-netberg/aurora-715/utils/netberg_nba715_platform.sh index 27e497435111..23c1373e13c0 100755 --- a/platform/innovium/sonic-platform-modules-netberg/aurora-715/utils/netberg_nba715_platform.sh +++ b/platform/innovium/sonic-platform-modules-netberg/aurora-715/utils/netberg_nba715_platform.sh @@ -3,6 +3,7 @@ # Install aurora-715 python package DEVICE="/usr/share/sonic/device" PLATFORM=$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform) +export PATH=$PATH:/usr/local/bin if [ -e $DEVICE/$PLATFORM/sonic_platform-1.0-py3-none-any.whl ]; then pip install $DEVICE/$PLATFORM/sonic_platform-1.0-py3-none-any.whl