These steps were validated on Raspberry Pi 4B. (Thu 6 Oct 15:05:21 HKT 2022)
_,met$$$$$gg. pi@raspberrypi4b
,g$$$$$$$$$$$$$$$P. OS: Debian 11 bullseye
,g$$P"" """Y$$.". Kernel: aarch64 Linux 5.15.61-v8+
,$$P' `$$$. Uptime: 20m
',$$P ,ggs. `$$b: Packages: 1427
`d$$' ,$P"' . $$$ Shell: zsh 5.8
$$P d$' , $$P Disk: 4.4G / 33G (14%)
$$: $$. - ,d$$' CPU: BCM2835 @ 4x 1.8GHz
$$\; Y$b._ _,d$P' GPU:
Y$$. `.`"Y$$$$P"' RAM: 834MiB / 7636MiB
`$$b "-.__
`Y$$
`Y$$.
`$$b.
`Y$$b.
`"Y$b._
`""""
References:
-
The repository at piwheels.org does not currently support the 64-bit version of the Raspberry Pi OS (currently in beta). We have plans to support it in future, but this requires a significant amount of work, and then rebuilding all wheels on the new architecture. Read more on the blog and issue #220.
Table of Contents
[TOC]
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
ssid="wifi-name"
psk="wifi-password"
key_mgmt=WPA-PSK
}
$ sudo raspi-config
- File system expansion, to make sure the SD card is writable
- GPU ram, 256 mb +
- Hostname
After updating, reboot Raspberry Pi immediately.
Install Docker Engine on Debian
-
Update the
apt
package index and install packages to allowapt
to use a repository over HTTPS:$ sudo apt-get update $ sudo apt-get install \ ca-certificates \ curl \ gnupg \ lsb-release
-
Add Docker’s official GPG key:
$ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
-
Use the following command to set up the stable repository. To add the nightly or test repository, add the word
nightly
ortest
(or both) after the wordstable
in the commands below. Learn about nightly and test channels.$ echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
This procedure works for Debian on x86_64
/ amd64
, armhf
, arm64
, and Raspbian.
-
Update the
apt
package index, and install the latest version of Docker Engine and containerd, or go to the next step to install a specific version:$ sudo apt-get update $ sudo apt-get install docker-ce docker-ce-cli containerd.io
Got multiple Docker repositories?
If you have multiple Docker repositories enabled, installing or updating without specifying a version in the
apt-get install
orapt-get update
command always installs the highest possible version, which may not be appropriate for your stability needs. -
To install a specific version of Docker Engine, list the available versions in the repo, then select and install:
a. List the versions available in your repo:
$ apt-cache madison docker-ce docker-ce | 5:18.09.1~3-0~debian-stretch | https://download.docker.com/linux/debian stretch/stable amd64 Packages docker-ce | 5:18.09.0~3-0~debian-stretch | https://download.docker.com/linux/debian stretch/stable amd64 Packages docker-ce | 18.06.1~ce~3-0~debian | https://download.docker.com/linux/debian stretch/stable amd64 Packages docker-ce | 18.06.0~ce~3-0~debian | https://download.docker.com/linux/debian stretch/stable amd64 Packages
b. Install a specific version using the version string from the second column, for example,
5:18.09.1~3-0~debian-stretch
.$ sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io
-
Verify that Docker Engine is installed correctly by running the
hello-world
image.$ sudo docker run hello-world
This command downloads a test image and runs it in a container. When the container runs, it prints a message and exits.
Docker Engine is installed and running. The docker
group is created but no users are added to it. You need to use sudo
to run Docker commands. Continue to Linux postinstall to allow non-privileged users to run Docker commands and for other optional configuration steps.
To upgrade Docker Engine, first run sudo apt-get update
, then follow the installation instructions, choosing the new version you want to install.
$ sudo gpasswd -a $USER docker
$ newgrp docker
Portainer Official Docker Image
$ docker run \
--name portainer \
-p 8000:8000 \
-p 9000:9000 \
--restart "always" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ~/docker-file-mapping/portainer-ce:/data \
-d portainer/portainer-ce:2.15.1-alpine
$ docker run -d \
--restart=always \
--privileged \
--network=host \
--name v2raya \
-v /lib/modules:/lib/modules:ro \
-v /etc/resolv.conf:/etc/resolv.conf \
-v /etc/v2raya:/etc/v2raya \
mzz2017/v2raya:1.5.4
Installation
$ sudo apt install proxychains -y
Configuration
$ sudo nano /etc/proxychains.conf
socks4 127.0.0.1 20170
Proxychains Validation
$ proxychains curl http://google.com
If you can access Google, the output should be like,
ProxyChains-3.1 (http://proxychains.sf.net)
|DNS-request| google.com
|S-chain|-<>-127.0.0.1:20170-<><>-4.2.2.2:53-<><>-OK
|DNS-response| google.com is 142.250.206.174
|S-chain|-<>-127.0.0.1:20170-<><>-142.250.206.174:80-<><>-OK
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>
Install zsh
$ sudo apt update && sudo apt upgrade -y
$ sudo apt install zsh -y
Set zsh as default
$ chsh -s $(which zsh)
Validate zsh
$ echo $0
https://segmentfault.com/a/1190000040307253
# curl
$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# wget
$ sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
$ git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
# gitee.com
$ git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
Set oh-my-zsh theme
$ nano ~/.zshrc
ZSH_THEME="powerlevel10k/powerlevel10k"
Install font
# Download fontface into current directory
$ proxychains wget https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Hack/Regular/HackNerdFontMono-Regular.ttf
# Copy to system font directory
$ sudo cp Hack\ Regular\ Nerd\ Font\ Complete.ttf /usr/share/fonts/truetype
Install plugins:
$ git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
plugins=(
git
history
common-aliases
zsh-autosuggestions
zsh-syntax-highlighting
)
Modify /etc/dhcpcd.conf
$ sudo nano /etc/dhcpcd.conf
With
static routers=192.168.31.51
static domain_name_servers=192.168.31.51
And then restart service
$ sudo service dhcpcd restart
Enter the following into the terminal:
$ sudo apt update
$ sudo apt install snapd
You will also need to reboot your device. This can be accomplished from the terminal (and from the desktop), but make sure you save any open documents first:
$ sudo reboot
After this, install the core
snap in order to get the latest snapd
.
$ sudo snap install core
core 16-2.45.2 from Canonical✓ installed
And then make snap zsh aware.
I can't use snap packages, even if installed
Modify oh-my-zsh profile
$ nano ~/.zshrc
Add this below,
# Make snapd zsh aware
emulate sh -c "source /etc/profile"
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored. #1438
I followed the answer here: https://stackoverflow.com/a/50958615/7186064I just commented the line. Now, I have no more messages and nextcloud works.
$ sudo nano /etc/ld.so.preload
And then,
# /usr/lib/arm-linux-gnueabihf/libarmmem-${PLATAFORM}.so
- Visual Studio Code installation with apt
- PyCharm
- SDKMAN
- Node.js installation with apt
tldr
installation with apt
https://stackoverflow.com/a/66474609/9728243
I had this same problem with python 3.6 and python 3.7 on Raspberry Pi, but I thing it shall work anywhere.
The only thing that works like a charm was to move the lsb_release to a backup file.
sudo mv /usr/bin/lsb_release /usr/bin/lsb_release_back
The complete doc can be found here: [readthedocs.io].[1]https://neoctobers.readthedocs.io/en/latest/rpi/install_python3.html
$ ls -l /usr/bin | grep python
# ln -snf TARGET LINK_NAME
$ sudo ln -snf /usr/bin/python3.7 /usr/bin/python3
If you end up using pip to install OpenCV on your Raspberry Pi, rest assured, you’re using the optimized version.
The Raspberry Pi requires that you install a few system packages before you get started:
$ sudo apt-get install libhdf5-dev libhdf5-serial-dev libhdf5-103
$ sudo apt-get install libqtgui4 libqtwebkit4 libqt4-test python3-pyqt5
$ sudo apt-get install libatlas-base-dev
$ sudo apt-get install libjasper-dev
If following error (UNPROTECTED PRIVATE KEY) occurs,
$ git clone [email protected]:johnnymillergh/home_guardian.git -b develop
Cloning into 'home_guardian'...
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/home/pi/.ssh/id_ed25519' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/home/pi/.ssh/id_ed25519": bad permissions
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Fix the issue by following command,
# Fix file permission for GitHub SSH keypair
$ chmod 400 ~/.ssh/id_ed25519 ~/.ssh/id_ed25519.pub