Great! Since you have wget, we can proceed with downloading and installing Wine (both 64-bit and 32-bit) locally without sudo. Here’s a streamlined approach:
Method 1: Download Pre-built Wine Binaries (Easiest)
If you just need Wine to run Windows apps (without compiling from source), you can use a portable Wine build.
1. Download a Portable Wine Build
wget https://github.com/Kron4ek/Wine-Builds/releases/download/8.0/wine-8.0-amd64.tar.xz
tar -xf wine-8.0-amd64.tar.xz -C ~/.local/
2. Add Wine to PATH
Add this to ~/.bashrc (or ~/.zshrc if using Zsh):
export PATH="$HOME/.local/wine-8.0-amd64/bin:$PATH"
Then reload:
source ~/.bashrc
3. Test Wine
wine64 --version
4. For 32-bit Support
If the build includes both 64-bit and 32-bit (wine and wine64 binaries), you can use:
WINEARCH=win32 WINEPREFIX="$HOME/.wine32" wine wineboot
Method 2: Build Wine from Source (More Control)
If you need a custom build, follow these steps:
1. Install Dependencies (Locally)
Download and extract required libraries manually (example for Debian/Ubuntu):
wget http://security.ubuntu.com/ubuntu/pool/main/libx/libx11/libx11-dev_1.6.9-2ubuntu1.2_amd64.deb
dpkg -x libx11-dev_*.deb ~/.local/
export LD_LIBRARY_PATH="$HOME/.local/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"
Repeat for other deps (libfreetype6-dev, libgl1-mesa-dev, etc.).
2. Download Wine Source
wget https://dl.winehq.org/wine/source/8.x/wine-8.0.tar.xz
tar -xf wine-8.0.tar.xz
cd wine-8.0
3. Build 64-bit Wine
mkdir -p ~/wine64-build && cd ~/wine64-build
../wine-8.0/configure --prefix="$HOME/.local/wine64" --enable-win64
make -j$(nproc)
make install
4. Build 32-bit Wine
mkdir -p ~/wine32-build && cd ~/wine32-build
../wine-8.0/configure --prefix="$HOME/.local/wine32" --with-wine64="$HOME/wine64-build"
make -j$(nproc)
make install