Skip to content

Commit

Permalink
windows dev machine: add troubleshooting guide for node installation …
Browse files Browse the repository at this point in the history
…on WSL
  • Loading branch information
jipodine committed Nov 28, 2024
1 parent 39231bb commit af4b347
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 6 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions resources/windows_apt-get install npm_fix-missing.rtf
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{\rtf1\ansi\ansicpg1252\cocoartf2761
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 CascadiaMono-Regular;\f1\fnil\fcharset0 CascadiaMono-Regular_Bold;}
{\colortbl;\red255\green255\blue255;\red0\green0\blue0;\red252\green50\blue33;}
{\*\expandedcolortbl;;\csgray\c0;\cssrgb\c100000\c29522\c16523;}
\paperw11900\paperh16840\margl1440\margr1440\vieww15780\viewh14440\viewkind0
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li304\fi4\ri-3254\pardirnatural\partightenfactor0

\f0\fs24 \cf2 \CocoaLigature0 \
Err:2 http://ports.ubuntu.com/ubuntu-ports noble-updates/main arm64 linux-libc-dev arm64 6.8.0-48.48\
404 Not Found [IP: 2620:2d:4000:1::19 80]\
Fetched 84.9 MB in 10s (8262 kB/s) \

\f1\b \cf3 E:
\f0\b0 \cf2 Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux/linux-libc-dev_6.8.0-48.48_arm64.deb 404 Not Found [IP: 2620:2d:4000:1::19 80]\

\f1\b \cf3 E:
\f0\b0 \cf2 Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?\
\
root@m3410-w11:~# apt-get update\
\
Hit:1 http://ports.ubuntu.com/ubuntu-ports noble InRelease\
Get:2 http://ports.ubuntu.com/ubuntu-ports noble-updates InRelease [126 kB]\
Get:3 http://ports.ubuntu.com/ubuntu-ports noble-backports InRelease [126 kB\
\
Get:29 http://ports.ubuntu.com/ubuntu-ports noble-security/restricted arm64 Components [212 B]\
Get:30 http://ports.ubuntu.com/ubuntu-ports noble-security/multiverse arm64 Components [212 B]\
Fetched 5155 kB in 2s (2114 kB/s) \
Reading package lists... Done\
\
root@m3410-w11:~# apt-get update --fix-missing\
\
Hit:1 http://ports.ubuntu.com/ubuntu-ports noble InRelease\
Hit:2 http://ports.ubuntu.com/ubuntu-ports noble-updates InRelease\
Hit:3 http://ports.ubuntu.com/ubuntu-ports noble-backports InRelease\
Hit:4 http://ports.ubuntu.com/ubuntu-ports noble-security InRelease\
Reading package lists... Done\
\
root@m3410-w11:~# apt install npm\
\
Reading package lists... Done\
Building dependency tree... Done\
Reading state information... Done\
The following additional packages will be installed:\
build-essential bzip2 cpp cpp-13 cpp-13-aarch64-linux-gnu cpp-aarch64-linux-gnu dpkg-dev eslint fakeroot g++ g++-13\
\
\
\
\
}
32 changes: 26 additions & 6 deletions setting-up-dev-machine.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ On any host, _dotpi_ requires:

## Linux

In addition to the common requirements, be sure that the following packages are installed:
Install the common requirements:

- `npm`
- `rpi-imager`

Install also the following packages:

- `git`
- `make`
Expand Down Expand Up @@ -47,15 +52,30 @@ Be sure to install `Node.js` _within_ `WSL`.
```
PS C:\Windows\system32> wsl
Launching Ubuntu...
root@m3410-w11:~# apt install node
root@m3410-w11:~# apt install npm
```

Do _not_ install the `Raspberry Pi Imager` in WSL.
If you get errors, read the messages.

![windows-apt-get-error-fix-missing](./assets/setting-up-dev-machine/windows_apt_install_npm_error_fix_missing.png)

Then, try to solve the problems (within `WSL`).

```
root@m3410-w11:~# apt-get update
root@m3410-w11:~# apt-get update --fix-missing
```

Finally, install `npm` again (still within `WSL`).

```
root@m3410-w11:~# apt install npm
```

In this first guide we will see how to use the `dotpi-install` tools to setup a Raspberry Pi, and how to monitor and control it remotely using the `dotpi-manager`
`Raspberry Pi Imager` is an exception: Do _not_ install it within `WSL`. (Later, do _not_ run it within `WSL`.)

::: info
For windows, run _any_ commands within `WSL`.
For windows, run _any_ shell command within `WSL`.
:::

## Installing `dotpi-tools`
Expand All @@ -67,5 +87,5 @@ npm install -g @dotpi/tools
Now, the command `dotpi-tools`should be available in your machine.

::: tip
If you prefer to use `npx` rather tha installing the package globally, just replace `dotpi-tools` by `npx @dotpi/tools` in the remaining of these tutorials.
If you prefer to use `npx` rather than installing the package globally, just replace `dotpi-tools` by `npx @dotpi/tools` in the remaining of these tutorials.
:::

0 comments on commit af4b347

Please sign in to comment.