Can't install powershell in Parallels Kali Linux Virtual Machine

880 views Asked by At

I've been trying to install Powershell for a few hours now. I run this under root:

apt update && apt -y install powershell

This is what I end up getting after it runs through and seemingly downloads

Package powershell is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'powershell' has no installation candidate

When I try to run this same command outside of root using sudo, I get the following:

E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

I have updated everything and tried a few different ways. I even downloaded a completely new Virtual Machine in Parallels to see if restarting would help out. I still run into the same problems. This is a Kali Linux VM on Parallels MacOS M1. Not sure if that matters or not. I think Parallels itself may possibly be using an apt process in the background, but when I do:

sudo killall apt apt-get

I end up getting

apt: no process found
apt-get: no process found

I've been trying everything. I'm on a new Mac so I don't have too many VM options. If someone could figure this out in Parallels, it would be a great help.

I've tried a lot. In the description above.

1

There are 1 answers

0
karel On

To install PowerShell in Kali Linux open the terminal and type:

sudo apt update
sudo apt install -y snapd # install daemon and tooling that enable snap packages
sudo systemctl enable --now snapd apparmor

Log out and back in again, and run the following command to install the powershell snap package.

sudo snap install powershell --classic