New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Powershell to use libcurl4 #7719

Closed
tjnull opened this Issue Sep 6, 2018 · 18 comments

Comments

Projects
None yet
6 participants
@tjnull

tjnull commented Sep 6, 2018

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.

@thezim

This comment has been minimized.

Contributor

thezim commented Sep 6, 2018

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.

@tjnull

This comment has been minimized.

tjnull commented Sep 6, 2018

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

@thezim

This comment has been minimized.

Contributor

thezim commented Sep 6, 2018

There is no direct dependency on libcurl but there may exist a sub-dependency. Perhaps you can try using this to find where it is at.

@iSazonov

This comment has been minimized.

Collaborator

iSazonov commented Sep 7, 2018

I can confirm that currently CoreFX (and PowerShell Core) doesn't depend on curl.

@cashbea

This comment has been minimized.

cashbea commented Sep 9, 2018

powershell 6.0.4 still depends on it at kali linux 18.2.

@iSazonov

This comment has been minimized.

Collaborator

iSazonov commented Sep 10, 2018

@cashbea Kali distributive is out of the repo. It is supported by Kali community.

@iSazonov iSazonov closed this Sep 10, 2018

@tjnull

This comment has been minimized.

tjnull commented Sep 10, 2018

@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

@rhertzog

This comment has been minimized.

rhertzog commented Sep 10, 2018

@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 <PowerShellTeam@hotmail.com>
 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...

@iSazonov

This comment has been minimized.

Collaborator

iSazonov commented Sep 10, 2018

@TravisEz13 Could you please look the issue with Debian package?

@iSazonov iSazonov reopened this Sep 10, 2018

@tjnull

This comment has been minimized.

tjnull commented Sep 10, 2018

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

@SteveL-MSFT

This comment has been minimized.

Member

SteveL-MSFT commented Sep 10, 2018

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.

@iSazonov

This comment has been minimized.

Collaborator

iSazonov commented Sep 10, 2018

@SteveL-MSFT Thanks, I skipped that fact about 6.0.

@tjnull Preview execution file is pwsh-preview not pwsh.

@tjnull

This comment has been minimized.

tjnull commented Sep 10, 2018

@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!

@tjnull

This comment has been minimized.

tjnull commented Sep 11, 2018

@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

@iSazonov

This comment has been minimized.

Collaborator

iSazonov commented Sep 11, 2018

@tjnull Thanks for confirmation! I hope you continue testing PowerShell Core on Kali. Feedback from community is very important.

@tjnull

This comment has been minimized.

tjnull commented Sep 11, 2018

@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?

@iSazonov

This comment has been minimized.

Collaborator

iSazonov commented Sep 12, 2018

@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.

@tjnull

This comment has been minimized.

tjnull commented Sep 13, 2018

@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

@tjnull tjnull closed this Sep 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment