Upgrading and Uninstalling MindX SDK

Upgrade or uninstall MindX SDK based on the development scenario by referring to the following table.

Table 1 Upgrading or uninstalling the development kit

Operation

Procedure

Upgrade

  1. Obtain and upload the software packages of the required version by referring to Obtaining Software Packages.
  2. Run the following command in the software package upload directory to uninstall the installed software package and install the uploaded software package: During the upgrade, the old version specified by the environment variable MX_SDK_HOME is uninstalled, and a new version is installed in the same directory.

    ./*.run --upgrade

    *.run indicates the name of the obtained SDK software package. Replace it with the actual name.

  3. Run the following command to query the version upgrade records:

    cd ~/log/mindxsdk/

    cat deployment.log

    The following is an example of the command output:

    MindX SDK mxVision:  2.0.1  ->  MindX SDK mxVision:  2.0.2

Uninstallation

You can use the uninstallation tool.

The uninstallation tool is used to uninstall MindX SDK from the current directory. Before the uninstallation, the tool checks whether any service of the SDK is running. User data and configuration are retained after the uninstallation.

Perform the following steps to use the tool:

  1. Check whether you have the execute permission on the uninstall.sh script in the bin directory of the SDK directory.

    cd ~/mxVision/bin

    ls -l uninstall.sh

    If you do not have the execute permission on the script, go to 2. Otherwise, go to 3.

  2. Grant the execute permission on the uninstall.sh script.

    chmod +x uninstall.sh

  3. Run either of the following commands to start the uninstallation:
    • ./uninstall.sh
    • ./Ascend-mindxsdk-mxvision_{version}_linux-aarch64.run --uninstall
    NOTE:

    The uninstall.sh script can be used only for normal installation. To rectify installation exceptions, run the --uninstall command first.

  4. When the uninstallation script is executed, the uninstallation script checks whether any service of the SDK is running. If any service of the SDK is running, a warning message is displayed.
    [WARN ][Uninst  ]Some services are still running. Uninstallation aborted.

    The uninstallation is interrupted, and the returned value is 255. In this case, check the running status of the current SDK services:

    pgrep mxStreammanager | xargs ps -o cmd=-p | grep $(pwd)

    pgrep mxmfCommander | xargs ps -o cmd=-p | grep $(pwd)

    Check the running status of each process. If related processes cannot be stopped due to service reasons, stop the uninstallation process.

  5. If no running service of the SDK is detected, a message is displayed.
    [INFO ][Uninst  ]No service is running. Uninstallation going.

    The uninstallation starts. During the uninstallation, the following message may be displayed for some folders:

    rm: cannot remove 'config': Directory not empty

    This message is generated because the configuration file is reserved. You can ignore the message.