Powershell in Kali Linux 2018.3 currently requires libcurl3 to run. However, Kali is currently using libcurl4.
Other programs are currently using libcurl4 and if you downgrade to libcurl3 multiple programs including Metasploit also break as well.
Proof:
root@kali:~# apt -y install powershell
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
powershell : Depends: libcurl3 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@kali:~# apt-get install libcurl3
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
curl libcurl4 metasploit-framework
The following NEW packages will be installed:
libcurl3
0 upgraded, 1 newly installed, 3 to remove and 0 not upgraded.
Need to get 260 kB of archives.
After this operation, 250 MB disk space will be freed.
PowerShell Core no longer has a dependency on libcurl #6964. What version are you trying to install with apt? It could be that the package is being published with a libcurl dependency when it shouldn't.
powershell 6.0.4-1.debian.9 amd64
https://packages.microsoft.com/repos/microsoft-debian-stretch-prod/pool/main/p/powershell/
That is where the repo is getting it from
I can confirm that currently CoreFX (and PowerShell Core) doesn't depend on curl.
powershell 6.0.4 still depends on it at kali linux 18.2.
@cashbea Kali distributive is out of the repo. It is supported by Kali community.
@iSazonov So since libcurl is not a dependency in powershell? Why does the dependency still appear in the latest version of powershell when I try to install it? Just curious :D
@iSazonov Then the powershell Debian repositories have not been updated accordingly:
$ wget https://packages.microsoft.com/repos/microsoft-debian-stretch-prod/pool/main/p/powershell/powershell_6.0.4-1.deb
$ dpkg -I powershell_6.0.4-1.deb
new Debian package, version 2.0.
size 52557832 bytes: control archive=13199 bytes.
571 octets, 13 lignes control
43318 octets, 424 lignes md5sums
262 octets, 14 lignes * postinst #!/bin/sh
105 octets, 7 lignes * postrm #!/bin/sh
Package: powershell
Version: 6.0.4-1.debian.9
License: MIT License
Vendor: Microsoft Corporation
Architecture: amd64
Maintainer: PowerShell Team <[email protected]>
Installed-Size: 138094
Depends: libc6, libcurl3, libgcc1, libgssapi-krb5-2, liblttng-ust0, libstdc++6, libunwind8, libuuid1, zlib1g, libssl1.0.2, libicu57
Section: shells
Priority: extra
Homepage: https://microsoft.com/powershell
Description: PowerShell is an automation and configuration management platform.
It consists of a cross-platform command-line shell and associated scripting language
The dependency on libcurl3 is there...
@TravisEz13 Could you please look the issue with Debian package?
I have tested the installations for the following packages in:
https://packages.microsoft.com/repos/microsoft-debian-stretch-prod/pool/main/p/
https://packages.microsoft.com/repos/microsoft-debian-jessie-prod/pool/main/p/
Here are the results from both packages that are compatible for debian:
All of the packages contained in Powershell require libcurl3 (Both for jessie and stretch).
The packages in Powershell preview for jessie and stretch appear to work fine in Kali Linux 2018.3. Only one package failed in stretch and that was: powershell-preview_6.1.0~rc.1-1.deb
The results are attached here for review.
Powershell jessie packages results.txt
Powershell Preview Jessie package results.txt
Powershell Preview Stretch Package Results.txt
Powershell Stretch Package results.txt
Please let me know if you have any questions
PSCore6.0.x depends on .NET Core 2.0.x which DOES depend on libcurl. PSCore6.1 depends on .NET Core 2.1.x which does NOT depend on libcurl.
@SteveL-MSFT Thanks, I skipped that fact about 6.0.
@tjnull Preview execution file is pwsh-preview not pwsh.
@iSazonov Thanks for letting me know. I will re-run the tests with pwsh-preview for the powershell preview packages for Stretch and Jessie on Kali.
Thanks for your help on this!
@iSazonov Re-ran the tests and can confirm that Powershell Preview Packages from Jessie and Stretch work on Kali Linux 2018.3
Attached results to this comment below:
Powershell jessie packages results.txt
Powershell Stretch Package results.txt
@tjnull Thanks for confirmation! I hope you continue testing PowerShell Core on Kali. Feedback from community is very important.
@iSazonov Anytime :D! Do you know when the actual Powershell packages will be updated for Jessie or Stretch? When they do get updated with libcurl3 being removed I would love to test them.
In the meantime I will write a walkthrough to the Kali/Debian community on how they can install and use powershell preview if that is okay with you on the issue that I have identified?
@tjnull PowerShell Core 6.0.x is based on .Net Core 2.0. .Net Core 2.0 has dependence on libcurl. So PowerShell Core 6.0.x can not remove the dependence.
PowerShell Core 6.1.x is based on .Net Core 2.1. .Net Core 2.1 has no dependence on libcurl. You can download 6.1.0 RC1 from Release page. We expect 6.1.0 GA in days.
@iSazonov Powershell 6.1.0-1 has been added to both jessie and stretch repos. I have tested both packages in Kali Linux and can confirm that they both work. Thank you for getting this issue resolved! :D
Packages that worked in Jessie and Stretch:
Stretch:powershell_6.1.0-1.deb 13-Sep-2018 00:34 58286110
Jessie:powershell_6.1.0-1.deb 13-Sep-2018 00:33 58287274
Most helpful comment
@iSazonov Powershell 6.1.0-1 has been added to both jessie and stretch repos. I have tested both packages in Kali Linux and can confirm that they both work. Thank you for getting this issue resolved! :D
Packages that worked in Jessie and Stretch:
Stretch:powershell_6.1.0-1.deb 13-Sep-2018 00:34 58286110
Jessie:powershell_6.1.0-1.deb 13-Sep-2018 00:33 58287274