2

I am trying to install old solana versions.

sh -c "$(curl -sSfL https://release.solana.com/v1.14.10/install)"

But im getting this error:

Error: Unknown release: 1.14.10

2
  • why not build from source for the specific releases version that is tagged on github?
    – nickfrosty
    Commented Nov 11 at 18:54
  • Because then i would need to figure out the specific plattform tools version for each release and i couldnt figure out how.
    – Jonas H.
    Commented Nov 12 at 10:21

1 Answer 1

2

This is breaking because old installer version got only 100 release tags in their code. This was fixed later by introducing paging:

https://github.com/solana-labs/solana/pull/21417

The install downloads a file called solana-install-init into the /var/ folder and then calls it. You can not change this file since its a binary. But you can change the install script to call that file with other SOLANA_INSTALL_INIT_ARGS.

Here is a wrapper script that does that and takes the version you want to install as a parameter. It downloads the install script from version 1.18.20 and then replaces the desired version in that script and then calls it:

#!/bin/bash

# Check if a version argument is passed; if not, use a default
DESIRED_SOLANA_VERSION=${1:-"v1.14.10"}

# Fetch the latest installer version
LATEST_INSTALLER_VERSION=$(curl -sSfL https://api.github.com/repos/solana-labs/solana/releases/latest | grep -m 1 "tag_name" | sed -ne 's/^ *"tag_name": "\([^"]*\)",$/\1/p')

# Download the latest install script
INSTALL_SCRIPT_URL="https://release.solana.com/$LATEST_INSTALLER_VERSION/install"
curl -sSfL "$INSTALL_SCRIPT_URL" -o solana_install_latest.sh

# Make the script executable
chmod +x solana_install_latest.sh

# Replace SOLANA_INSTALL_INIT_ARGS with the desired version in the downloaded script
sed -i.bak "s/^SOLANA_INSTALL_INIT_ARGS=.*/SOLANA_INSTALL_INIT_ARGS=$DESIRED_SOLANA_VERSION/" solana_install_latest.sh

# Verify that the change was made (for debugging, optional)
grep "SOLANA_INSTALL_INIT_ARGS=" solana_install_latest.sh

# Run the modified install script
./solana_install_latest.sh

You can call it like this:

./solana_install_wrapper.sh 1.14.10 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.