-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting Guide
Abraham Esandayinze Tanta edited this page Sep 26, 2025
·
1 revision
This guide helps you resolve common installation and runtime issues with PortKill.
Error Message:
portkill --help
[!] Missing required commands: lsof netstat
Please install missing dependencies and try again
Solution:
The latest AUR package (v2.3.1-2) automatically installs all dependencies. If you're seeing this error:
# Update your AUR package
yay -Syu portkill
# Or reinstall completely
yay -Rs portkill
yay -S portkillUbuntu/Debian:
sudo apt-get update
sudo apt-get install lsof net-toolsRHEL/CentOS/Fedora:
sudo dnf install lsof net-tools
# Or on older systems:
sudo yum install lsof net-toolsopenSUSE:
sudo zypper install lsof net-toolsmacOS:
# Usually pre-installed, but if missing:
brew install lsofError Message:
/usr/bin/portkill: line 93: /home/username/.portkill/portkill.log: No such file or directory
Solution: This is fixed in PortKill v2.3.2+. To resolve:
# Update to latest version
yay -Syu portkill# Create the directory manually as a temporary fix
mkdir -p ~/.portkill
# Or reinstall with the latest version
curl -sSL https://raw.githubusercontent.com/mr-tanta/portkill/main/install.sh | bashError Message:
portkill: command not found
# OR
permission denied: portkillSolutions:
- Check if portkill is in PATH:
which portkill
# Should show: /usr/bin/portkill or /usr/local/bin/portkill- Fix permissions:
sudo chmod +x /usr/bin/portkill
# Or
sudo chmod +x /usr/local/bin/portkill- Add to PATH (if needed):
# Add to ~/.bashrc or ~/.zshrc
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcError Message:
[!] Failed to kill process 1234 (Operation not permitted)
Solutions:
- Use with sudo for system processes:
sudo portkill 80
sudo portkill 443- Enable force mode:
portkill --force 3000- Check if process is protected:
portkill list 22 # SSH is typically protected# Verify version
portkill --version
# Expected: PortKill 2.3.2
# Test basic functionality
portkill --help
# Check dependencies
which lsof && echo "lsof: OK" || echo "lsof: MISSING"
which netstat && echo "netstat: OK" || echo "netstat: MISSING"# Check config directory
ls -la ~/.portkill/
# Should show: config.conf, history.log, portkill.log, whitelist.conf
# View current config
cat ~/.portkill/config.conf# List all ports (safe command)
portkill list
# Test on a known port (usually safe)
portkill list 22 # SSH port
# Run in verbose mode for debugging
portkill --verbose list# Missing base-devel group
sudo pacman -S --needed base-devel
# AUR helper not working
sudo pacman -S yay
# OR
sudo pacman -S paru# Repository issues
sudo apt-get update
sudo apt-get install -f
# Missing essential tools
sudo apt-get install build-essential curl wget# Enable EPEL repository (RHEL/CentOS)
sudo dnf install epel-release
# Missing development tools
sudo dnf groupinstall "Development Tools"# Command line tools missing
xcode-select --install
# Homebrew issues
brew doctor
brew update# Use specific port instead of scanning all
portkill list 3000
# Reduce timeout
portkill benchmark 3000 localhost 5 1 2 # 2 second timeout# Check process tree depth
portkill tree --depth 3 8080 # Limit depth
# Use quiet mode
portkill --quiet 3000# Enable verbose logging
portkill --verbose --dry-run list
# Check log file
tail -f ~/.portkill/portkill.log# Backup current config
cp -r ~/.portkill ~/.portkill.backup
# Reset to defaults
rm -rf ~/.portkill
# Run portkill to regenerate config
portkill --help# Test network commands directly
lsof -iTCP -sTCP:LISTEN
netstat -tulpn
ss -tulpn # Modern alternative- Check this troubleshooting guide
- Update to the latest version
-
Test with verbose mode:
portkill --verbose list - Gather system information:
uname -a # System info
portkill --version # PortKill version
which portkill # Installation location
lsof --version 2>&1 # Dependencies
netstat --version 2>&1- GitHub Issues: https://github.com/mr-tanta/portkill/issues
- AUR Comments: https://aur.archlinux.org/packages/portkill
-
Include:
- Operating system and version
- Installation method used
- Complete error message
- Output of diagnostic commands above
- ArchWiki: Search for port management topics
- Forums: Post in relevant Linux distribution forums
- Reddit: r/archlinux, r/linux, r/sysadmin
After resolving issues, verify everything works:
-
portkill --versionshows correct version -
portkill --helpdisplays without errors -
portkill listshows available ports - Dependencies available:
which lsof && which netstat - Configuration directory exists:
ls ~/.portkill/ - No permission errors when running commands
- Can kill test processes:
portkill --dry-run 3000
- Keep PortKill Updated:
# AUR users
yay -Syu portkill
# Manual installation users
curl -sSL https://raw.githubusercontent.com/mr-tanta/portkill/main/install.sh | bash- Regular System Updates:
# Keep system dependencies current
sudo pacman -Syu # Arch
sudo apt update && sudo apt upgrade # Ubuntu/Debian
sudo dnf update # Fedora- Monitor AUR Comments: Check https://aur.archlinux.org/packages/portkill for community-reported issues
π Most issues are resolved by updating to the latest version and ensuring all dependencies are installed!