This is a simple script to update and install the Aptos CLI to a specific version. It also lets you toggle between different versions of the Aptos CLI.
If you run into issues related to dependencies or you get a false positive install successful message please refer - https://aptos.dev/en/network/nodes/building-from-source#set-up-build-dependencies for a list of dependencies that aptos requires.
curl -sSL https://raw.githubusercontent.com/LayerZero-Labs/aptosup/main/install | bashFor installing from source please refer to Install from source
echo "export PATH=\"$HOME/.aptosup:\$PATH\"" >> ~/.zshrcand then refresh your shell
source ~/.zshrcfor bash use ~/.bashrc instead of ~/.zshrc
aptosup -lNote: You will be prompted to enter your sudo password during the process - as it might need to install dependencies via your package manager.
This sets the default version to be installed and set as active version.
aptosup -d <version>aptosup -i <version>This only installs the new version, you will need to set it as active version manually.
- if you want to install version 3.5.0 for movement network -
aptosup -i 3.5.0 - if you want to install version 6.0.1 for aptos network -
aptosup -i 6.0.1
The script checks if the aptos binary already exists in $HOME/.aptos. If it does, it switches the current active version to the new installed version.
aptosup -s <version>aptosup -r <version>aptosup -u× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
xyz, where xyz is the package you are trying to
install.
Create a python environment (python doc)[https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/] and re-run from within it