1

Is there a way to install PowerShell on TinyCore? The below link is the MS documentation for supported Linux distros.

https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-6

I thought of downloading the Ubuntu 18.04 package and using the TinyCore commands per below link

http://wiki.tinycorelinux.net/wiki:package_management_cheat_sheet

However, Wget fails somehow. Error: Server returned error. 404. Not found

I tried to install Snap. Successfully installed Git on TinyCore. Snap download succeeds per instructions https://docs.snapcraft.io/installing-snap-on-arch-linux

However, TinyCore doesn't have 'makepkg' or 'systemctl'.

Could there be any other workaround?

  • If wget failed it sounds like you have the wrong URL, since the one they provided is live. On the other hand, it [doesn't use apt](https://unix.stackexchange.com/questions/68570/can-i-use-apt-on-tinycore) anyway so you saved yourself an error on the next line. – Michael Homer Jul 13 '19 at 05:45
  • Did you try [the recommended instructions for other systems that are not officially supported](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-6#binary-archives)? What happened when you did? – Michael Homer Jul 13 '19 at 05:46
  • @MichaelHomer , Download with curl succeeds. However, then I run into a tar error . "tar: Invalid magic. tar: Short read" . Then if I try `tce-load -i /tmp/powershell.tar.gz` , it throws `tmp/powershell.tar.gz not found`. With sudo it says `Don't run this as root`. – Ayan Mullick Jul 13 '19 at 06:04
  • Your tar command might not be configured with support for compressed tar files. See if you can uncompress the .tar.gz file using gunzip, then try the tar command again on the resulting .tar file. – Mark Plotnick Jul 13 '19 at 11:36
  • @MarkPlotnick , I've tried `sudo tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/6.2.0` for gzip and `sudo tar Zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/6.2.0` for compress. Both throw the same error. – Ayan Mullick Jul 13 '19 at 17:56
  • Does `gunzip /tmp/powershell.tar.gz` succeed? – Mark Plotnick Jul 13 '19 at 18:34
  • @MarkPlotnick TC doesn't have gunzip. http://distro.ibiblio.org/tinycorelinux/7.x/x86/tcz/ I installed gzip. Ran `gzip -d /tmp/powershell.tar.gz`. Error: `gzip: /tmp/powershell.tar.gz not in gzip format` – Ayan Mullick Jul 13 '19 at 18:41
  • What is the output of `file /tmp/powershell.tar.gz` ? – Mark Plotnick Jul 13 '19 at 19:00
  • @MarkPlotnick, `-sh: file not found`. However, the file shows up when I run `ls /tmp` – Ayan Mullick Jul 13 '19 at 19:12
  • Can you run `od -t x1 /tmp/powershell.tar.gz | head -1` ? – Mark Plotnick Jul 13 '19 at 19:15
  • @MarkPlotnick, Output : `0000000 4e 6f 74 20 46 6f 75 6e 64` https://i.imgur.com/mBH10zm.jpg – Ayan Mullick Jul 13 '19 at 19:37
  • Your file contains the text "Not found". Try that curl command again and see if there are any error messages. – Mark Plotnick Jul 13 '19 at 19:59
  • Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/96161/discussion-between-ayan-mullick-and-mark-plotnick). – Ayan Mullick Jul 13 '19 at 21:01
  • I don't know what's happening, but something very strange. There seem to be two possibilities: 1) misconfigured Github mirroring/load-balancing/... that shows no files present when accessed *from your location*, or 2) something is silently intercepting and interfering with your HTTPS connections. The "Not Found" text is not what genuine 404 errors from that host produce. Do you have one of the `HTTP_PROXY`/`http_proxy`/`HTTPS_PROXY`/`https_proxy` variables set? What does `curl -v ...` show? – Michael Homer Jul 14 '19 at 05:51
  • [Here](https://mwh.nz/powershell-6.2.0-linux-x64.tar.gz) is that file copied to another location. Can you retrieve that one? – Michael Homer Jul 14 '19 at 05:52
  • @MichaelHomer, Responded on chat. download and extract succeeds. However, pwsh fails to run. [Screenshot] (https://i.stack.imgur.com/ki1TE.jpg) – Ayan Mullick Jul 14 '19 at 19:31

0 Answers0