cli-lab icon indicating copy to clipboard operation
cli-lab copied to clipboard

Can not exec in WSL bash

Open WeihanLi opened this issue 4 years ago • 3 comments

mkdir -p ~/dotnet-core-uninstall

wget https://github.com/dotnet/cli-lab/releases/download/1.5.255402/dotnet-core-uninstall.tar.gz

tar -zxf dotnet-core-uninstall.tar.gz -C ~/dotnet-core-uninstall
cd ~/dotnet-core-uninstall
./dotnet-core-uninstall -h

image

WeihanLi avatar Jan 05 '22 10:01 WeihanLi

Support for windows and mac ... but not linux?

Same error if i try to run in GH actions ubuntu-latest

      - name: install dotnet-core-uninstall
        env:
          GH_TOKEN: ${{ github.token }}
        run: |
          gh release download --repo dotnet/cli-lab --pattern 'dotnet-core-uninstall.tar.gz'
          tar -xvzf dotnet-core-uninstall.tar.gz
          chmod +x dotnet-core-uninstall
      - name: dotnet-core-uninstall list
        run: ./dotnet-core-uninstall list
/home/runner/work/_temp/32f9f1e6-3b59-4492-b24b-d084a032ca8d.sh: line 1: ./dotnet-core-uninstall: cannot execute binary file: Exec format error
Error: Process completed with exit code 126.

felickz avatar Feb 17 '23 19:02 felickz

@felickz how was the SDK installed on the Linux host? If via a package manager, using that package manager's commands for uninstalling the SDK would be my suggestion.

This tool is at least partially intended to help clean up systems that don't have quite such a centralized management system.

baronfel avatar Feb 17 '23 19:02 baronfel

To anyone else looking for an uninstall script for dotnet, I made a bash based one. It follows the conventions from dotnet-install.sh.

https://github.com/giggio/dotfiles/blob/7efb936e21fb64338bcf16f1859b715ab453ea10/home/bin/dotnet-uninstall

giggio avatar Oct 06 '23 23:10 giggio