Rekommenderad ordning
1. Uppdatera system
2. build-essential + headers
3. Git + editor
4. cmake/autotools
5. Språk du faktiskt använder
1
sudo apt update && sudo apt upgrade -y sudo apt install -y build-essential dkms linux-headers-$(uname -r)
2
sudo apt install -y git curl wget unzip zip
3
sudo apt install -y \ htop neofetch tree ncdu \ net-tools openssh-server \ software-properties-common \ apt-transport-https ca-certificates
4
sudo apt install -y nano
sudo snap install code --classic
5
sudo apt install -y \ cmake pkg-config \ autoconf automake libtool \ gdb strace ltrace
6
sudo apt install -y python3 python3-pip python3-venv sudo apt install -y nodejs npm sudo apt install -y default-jdk
7
sudo apt install -y zsh tmux fzf ripgrep
8
sudo apt install -y docker.io docker-compose sudo usermod -aG docker $USER
9
sudo ubuntu-drivers autoinstall sudo fwupdmgr refresh && sudo fwupdmgr update
10
sudo apt install -y ufw fail2ban sudo ufw enable
11
sudo apt install -y build-essential git cmake pkg-config linux-headers-$(uname -r)
-- darkbot
sudo apt update sudo apt install -y build-essential git \ autoconf automake libtool m4 pkg-config \ flex bison \ libncurses-dev
Vanliga kompileringsfel (och snabba fixes)
Fel: strupr saknas (vanligt på Linux/GCC) strupr() är inte standard i glibc.  Fix (snabbast): ersätt strupr(x) med en liten funktion.
Lägg detta i relevant .c (eller i en common header) och byt anrop:
c
'#include <ctype.h>'
static void str_to_upper(char s) { for (; *s; s++) *s = (char)toupper((unsigned char)s); } Sen: ersätt strupr(buf); med str_to_upper(buf);
Fel: “undefined reference” eller saknade headers/libs
make clean ./configure make -j"$(nproc)" V=1

Comments