Browsed by
Tag: linux

Quick fix for Ubuntu WSL failing to update because of systemd

Quick fix for Ubuntu WSL failing to update because of systemd

Hi everyone,

I’m a user of the Windows 10 WSL feature, where I run the Ubuntu distribution and always install the latest versions. I like to keep my packages up to date. Unfortunately, the latest Ubuntu release, 21.04 was not installed correctly and whenever I tried to update the system packages, it would error out when setting up systemd.

WSL Fix systemd 1

The solution to this seem to be a quick one. Turns out, the file was there, in the /usr/lib/systemd folder:

WSL Fix systemd 2

It seems that we can get around this issue by copying that file to the previous folder (/usr/lib, so the following command should be used:

sudo cp /usr/lib/systemd/ /usr/lib/

Now, go back to the previous folder and you should have it there:

WSL Fix systemd 3

Now you should be able to update your system packages without issues.

But now I’m getting this failure 😂:

WSL Fix systemd 4
Installing Node.js 10.x on Ubuntu Focal (20.04) before the official release

Installing Node.js 10.x on Ubuntu Focal (20.04) before the official release

Hi everyone,

Today, I’ll guide you through the steps of installing Node.js 10.x on Ubuntu Focal (20.04) which is stated to be officially released on April 23, 2020.

Right now, installing Node.js using the NodeSource Node.js official repositories do not work because they do not support unreleased versions of Ubuntu.

You may think of using a previous Ubuntu repository in order to install Node.js, but this will actually not work. This is because Ubuntu 20.04 renamed the Python 2 packages from python to python2.

Trying to install Node.js using the NodeSource repositories

The easiest way to normally install Node.js 10.x is by using the official NodeSource repository. For this, we follow their steps.

curl -sL | sudo -E bash

The problem is that because the OS hasn’t been officially released, we get the following issue:

NodeJS script failing on Ubuntu Focal 20.04

No problem. Let’s move to the manual installation method:

  1. Add the NodeSource package signing key:
    curl -sSL | sudo apt-key add -
  2. Set the version to node_10.x:
  3. Let’s set the distro to eoan, the current stable Ubuntu version:
  4. Now, we need to add the repository to our Linux installation:
    echo "deb$VERSION $DISTRO main" | sudo tee /etc/apt/sources.list.d/nodesource.list
    echo "deb-src$VERSION $DISTRO main" | sudo tee -a /etc/apt/sources.list.d/nodesource.list
  5. The commands should like this in the terminal:
    NodeJS Manual installation commands
  6. We can now run sudo apt update to update the repository information:
    NodeJS manual installation apt update
  7. We will now attempt to install the nodejs package by running sudo apt install nodejs:
    NodeJS installing nodejs fails

As you can see above, following the manual installation steps fails as well because there is no python-minimal package in Ubuntu 20.04. To solve this, we will manually download the Node.js Debian package and modify it to have it refer to python2-minimal instead of python-minimal.

Manually downloading, modifying and installing Node.js 10.x

  1. We will manually navigate to the repository to download the file here:
    NodeJS HTTP repo
  2. From there, just copy the desired Node.js package link to the clipboard. Then, use wget to download it on the terminal. I recommend downloading it to a clean directory since we will run some commands to extract and perform some modifications to it:
    Downloading the NodeJS debian package
  3. Once the download finishes, we need to extract the downloaded debian package with the ar utility:
    ar x nodejs_10.19.0-1nodesource1_amd64.deb
    extracting the NodeJS debian package
  4. We need to extract the control.tar.gz file:
    tar -xzf control.tar.gz
    Extracting control.tar.gz
  5. Using nano or your favorite text editor, we will edit the control file. Look for python-minimal:
    nano control
    Editing the control file
  6. Change python-minimal to python2-minimal:
    Renaming python-minimal to python2-minimal
  7. Save the file. On nano, press CTRL + O, then exit pressing CTRL + X.
  8. We now need to recreate the control.tar.gz tar package to include the modified control file. To do this, we will run the following command:
    tar -czf control.tar.gz control md5sums postinst pr einst prerm
    Recreating the control.tar.gz file
  9. Finally, we will replace the control.tar.gz in the debian package file. We will run the following command to do so:
    ar -r nodejs_10.19.0-1nodesource1_amd64.deb control.tar.gz
    Replacing the control.tar.gz in the NodeJS debian package
  10. We can now install the package with dpkg. We’ll run the following:
    sudo dpkg -i nodejs_10.19.0-1nodesource1_amd64.deb
    Installing the modified NodeJS debian package

After following the above steps, we should have Node.js installed on our operating system. We can confirm this by running node -v and npm -v:

Checking NodeJS and npm versions

And that’s it! We have successfully installed Node.js on our Ubuntu Focal installation.

How To Install and Configure BOINC in the PINE 64 Single Board Computer

How To Install and Configure BOINC in the PINE 64 Single Board Computer

Hi everyone!

On May 6, 2016 I received in my mail the PINE 64 Single Board Computer I backed up a few months on Kickstarter. My Pledge was for the PINE 64 2GB edition.

First thing I did was to download and write the Ubuntu Xenial Longsleep build image to my 16GB MicroSD card (The image is almost 8GB in size). Get the Pine64 builds here:

Next think I did was to boot up the PINE 64, and the first think I did once it booted up was to install BOINC:

However, after installing BOINC and adding some projects, I noticed they all returned a message saying there are no tasks for my current platform. The problem? The Ubuntu Xenial image is 64bit, meanwhile the projects available for the ARM architecture are made 32bit. Since BOINC reported the platform as 64bit (specifically the platform being reported is aarch64-unknown-linux-gnu), the projects didn’t recognized this and returned a no work available message (because they only send work to the platform type of arm-unknown-linux-gnueabihf). Ok, so how do I make my PINE 64 get those 32bit ARM tasks? It involved using the alt_platform option and doing some stuff in ubuntu:

Ok, so now I have the projects receiving tasks and the PINE 64 is crunching them as expected, except for [email protected] Hmmm, seems strange that all projects I added works except [email protected], so lets take a look at the workunit result:

../../projects/ error while loading shared libraries: cannot open shared object file: No such file or directory

So as you can see, WUProp can’t find The thing is that it IS installed, but only for the 64bit architecture and we must add the library for the 32bit architecture:

So there you go! We made our PINE 64 receive tasks and crunch them without any issues at all. Every task is being validated successfully 😉 So now, to enjoy our PINE 64 and let it crunch.

P.S. The PINE 64 is bigger than the Raspberry Pi’s:

One last video: