đ§ Installation Issues āĻāĻŦāĻ āϏāĻŽāĻžāϧāĻžāύ
FLX CLI installation āϏāĻāĻā§āϰāĻžāύā§āϤ āϏāĻŽāϏā§āϝāĻž āĻāĻŦāĻ āϤāĻžāĻĻā§āϰ āϏāĻŽāĻžāϧāĻžāύāĨ¤
đĨ Installation Problemsâ
1. "Command not found: flx"â
āϏāĻŽāϏā§āϝāĻž: Installation successful āĻšāĻāϝāĻŧāĻžāϰ āĻĒāϰāĻ flx
command āĻĒāĻžāĻāϝāĻŧāĻž āϝāĻžāĻā§āĻā§ āύāĻžāĨ¤
āϏāĻŽāĻžāϧāĻžāύ:
# PATH environment variable check āĻāϰā§āύ
echo $PATH
# Dart pub global bin directory check āĻāϰā§āύ
ls ~/.pub-cache/bin/
# PATH āĻ pub cache bin directory āϝā§āĻ āĻāϰā§āύ
export PATH="$PATH":"$HOME/.pub-cache/bin"
# Permanent āĻāϰāĻžāϰ āĻāύā§āϝ bash/zsh profile āĻ āϝā§āĻ āĻāϰā§āύ
echo 'export PATH="$PATH":"$HOME/.pub-cache/bin"' >> ~/.bashrc
source ~/.bashrc
# macOS āĻāϰ āĻāύā§āϝ .zshrc
echo 'export PATH="$PATH":"$HOME/.pub-cache/bin"' >> ~/.zshrc
source ~/.zshrc
# Verify installation
flx --version
2. "Failed to install FLX"â
āϏāĻŽāϏā§āϝāĻž: dart pub global activate flx_cli
command fail āĻšāĻā§āĻā§āĨ¤
āϏāĻŽāĻžāϧāĻžāύ:
# Dart SDK version check āĻāϰā§āύ (minimum 2.17.0)
dart --version
# Flutter SDK check āĻāϰā§āύ
flutter --version
# Pub cache clean āĻāϰā§āύ
dart pub cache clean
# Internet connection verify āĻāϰā§āύ
ping pub.dev
# Retry installation with verbose output
dart pub global activate flx_cli --verbose
# āϝāĻĻāĻŋ pub.dev access issue āĻšāϝāĻŧ, proxy settings check āĻāϰā§āύ
dart pub global activate flx_cli --verbose --trace
3. "Permission denied"â
āϏāĻŽāϏā§āϝāĻž: Installation āĻāϰ āϏāĻŽāϝāĻŧ permission errorāĨ¤
āϏāĻŽāĻžāϧāĻžāύ:
# Linux/macOS āĻāϰ āĻāύā§āϝ
sudo dart pub global activate flx_cli
# āĻ
āĻĨāĻŦāĻž user-level installation
mkdir -p ~/.local/bin
export PATH="$HOME/.local/bin:$PATH"
dart pub global activate flx_cli
# Directory permission fix āĻāϰā§āύ
chmod 755 ~/.pub-cache
chmod 755 ~/.pub-cache/bin
# Windows āĻāϰ āĻāύā§āϝ Administrator āĻšāĻŋāϏā§āĻŦā§ run āĻāϰā§āύ
# Run PowerShell/Command Prompt as Administrator
đĨī¸ Platform-specific Issuesâ
Windows Issuesâ
1. "Windows Defender blocking installation"â
āϏāĻŽāϏā§āϝāĻž: Antivirus software FLX CLI block āĻāϰāĻā§āĨ¤
āϏāĻŽāĻžāϧāĻžāύ:
# Windows Defender exclusion add āĻāϰā§āύ
# Settings -> Update & Security -> Windows Security -> Virus & threat protection
# -> Manage settings -> Add or remove exclusions
# Exclusion paths:
# %USERPROFILE%\AppData\Local\Pub\Cache
# %USERPROFILE%\AppData\Local\Pub\Cache\bin
# PowerShell execution policy check āĻāϰā§āύ
Get-ExecutionPolicy
# Execution policy change āĻāϰā§āύ (if needed)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
2. "Path not updating on Windows"â
āϏāĻŽāϏā§āϝāĻž: PATH environment variable update āĻšāĻā§āĻā§ āύāĻžāĨ¤
āϏāĻŽāĻžāϧāĻžāύ:
# Environment Variables manually add āĻāϰā§āύ
# System Properties -> Advanced -> Environment Variables
# User variables -> PATH -> Edit -> New
# Add: %USERPROFILE%\AppData\Local\Pub\Cache\bin
# PowerShell āĻĨā§āĻā§ temporary add āĻāϰā§āύ
$env:PATH += ";$env:USERPROFILE\AppData\Local\Pub\Cache\bin"
# Permanent add āĻāϰāĻžāϰ āĻāύā§āϝ
[Environment]::SetEnvironmentVariable(
"Path",
[Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User) + ";$env:USERPROFILE\AppData\Local\Pub\Cache\bin",
[EnvironmentVariableTarget]::User
)
# Restart PowerShell/Command Prompt
3. "Long path names issue"â
āϏāĻŽāϏā§āϝāĻž: Windows long path names support āύā§āĻāĨ¤
āϏāĻŽāĻžāϧāĻžāύ:
# Group Policy Editor (gpedit.msc) āĻĨā§āĻā§ enable āĻāϰā§āύ
# Computer Configuration -> Administrative Templates
# -> System -> Filesystem -> Enable Win32 long paths
# Registry āĻĨā§āĻā§ enable āĻāϰā§āύ
reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1
# Git config āĻāϰā§āύ
git config --system core.longpaths true
macOS Issuesâ
1. "macOS Gatekeeper blocking FLX"â
āϏāĻŽāϏā§āϝāĻž: macOS Gatekeeper FLX CLI block āĻāϰāĻā§āĨ¤
āϏāĻŽāĻžāϧāĻžāύ:
# Allow apps from anywhere (temporary)
sudo spctl --master-disable
# Specific file allow āĻāϰā§āύ
sudo xattr -rd com.apple.quarantine ~/.pub-cache/bin/flx
# Re-enable Gatekeeper
sudo spctl --master-enable
# Homebrew āĻĨā§āĻā§ Dart install āĻāϰā§āύ
brew install dart
# Verify installation
dart --version
flx --version
2. "Xcode Command Line Tools missing"â
āϏāĻŽāϏā§āϝāĻž: Command line tools missing āϝāĻž compilation āĻāϰ āĻāύā§āϝ āĻĻāϰāĻāĻžāϰāĨ¤
āϏāĻŽāĻžāϧāĻžāύ:
# Xcode Command Line Tools install āĻāϰā§āύ
xcode-select --install
# Verify installation
xcode-select --print-path
# License agree āĻāϰā§āύ
sudo xcodebuild -license accept
# Retry FLX installation
dart pub global activate flx
Linux Issuesâ
1. "Dart SDK not found"â
āϏāĻŽāϏā§āϝāĻž: Linux āĻ Dart SDK properly install āĻšāϝāĻŧāύāĻŋāĨ¤
āϏāĻŽāĻžāϧāĻžāύ:
# Official Dart repository add āĻāϰā§āύ
sudo apt update
sudo apt install apt-transport-https
wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
echo 'deb https://storage.googleapis.com/download.dartlang.org/linux/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list
# Dart SDK install āĻāϰā§āύ
sudo apt update
sudo apt install dart
# PATH add āĻāϰā§āύ
echo 'export PATH="$PATH:/usr/lib/dart/bin"' >> ~/.bashrc
source ~/.bashrc
# Verify installation
dart --version
2. "libstdc++ missing"â
āϏāĻŽāϏā§āϝāĻž: Required libraries missingāĨ¤
āϏāĻŽāĻžāϧāĻžāύ:
# Ubuntu/Debian
sudo apt update
sudo apt install build-essential libstdc++6
# CentOS/RHEL/Fedora
sudo yum install gcc-c++ libstdc++
# āĻ
āĻĨāĻŦāĻž
sudo dnf install gcc-c++ libstdc++
# Arch Linux
sudo pacman -S base-devel
# Verify libraries
ldd $(which dart)
đ Network Issuesâ
1. "Unable to connect to pub.dev"â
āϏāĻŽāϏā§āϝāĻž: Network connectivity issuesāĨ¤
āϏāĻŽāĻžāϧāĻžāύ:
# Network connectivity test āĻāϰā§āύ
ping pub.dev
ping google.com
# DNS check āĻāϰā§āύ
nslookup pub.dev
# Alternative DNS āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻāϰā§āύ
# Google DNS: 8.8.8.8, 8.8.4.4
# Cloudflare DNS: 1.1.1.1, 1.0.0.1
# Proxy settings check āĻāϰā§āύ (if applicable)
echo $HTTP_PROXY
echo $HTTPS_PROXY
# Pub cache clean āĻāĻŦāĻ retry
dart pub cache clean
dart pub global activate flx
2. "Certificate verification failed"â
āϏāĻŽāϏā§āϝāĻž: SSL certificate verification issuesāĨ¤
āϏāĻŽāĻžāϧāĻžāύ:
# Certificate store update āĻāϰā§āύ
# Ubuntu/Debian
sudo apt update && sudo apt install ca-certificates
# macOS
brew update && brew install ca-certificates
# Manual certificate verification disable (not recommended)
export PUB_HOSTED_URL=http://pub.dartlang.org
dart pub global activate flx
# Git SSL verification disable (temporary)
git config --global http.sslVerify false
3. "Corporate firewall blocking"â
āϏāĻŽāϏā§āϝāĻž: Corporate network firewall blocking pub.devāĨ¤
āϏāĻŽāĻžāϧāĻžāύ:
# Proxy configuration
export HTTP_PROXY=http://proxy.company.com:8080
export HTTPS_PROXY=http://proxy.company.com:8080
# Dart pub proxy configuration
dart pub config set HTTP_PROXY http://proxy.company.com:8080
dart pub config set HTTPS_PROXY http://proxy.company.com:8080
# Verify proxy settings
dart pub config
# Alternative: Manual download āĻāĻŦāĻ install
# Download .tar.gz file manually āĻāĻŦāĻ extract āĻāϰā§āύ
đ Version Issuesâ
1. "Dart SDK version incompatible"â
āϏāĻŽāϏā§āϝāĻž: Dart SDK version too oldāĨ¤
āϏāĻŽāĻžāϧāĻžāύ:
# Current Dart version check āĻāϰā§āύ
dart --version
# Minimum required: Dart 2.17.0
# Dart SDK update āĻāϰā§āύ
# Flutter users:
flutter upgrade
# Standalone Dart:
# Download latest from https://dart.dev/get-dart
# Verify compatibility
dart --version
flutter --version
2. "FLX version conflict"â
āϏāĻŽāϏā§āϝāĻž: Multiple versions installed āĻŦāĻž version mismatchāĨ¤
āϏāĻŽāĻžāϧāĻžāύ:
# Current installed version check āĻāϰā§āύ
flx --version
# Uninstall existing version
dart pub global deactivate flx
# Clean pub cache
dart pub cache clean
# Install latest version
dart pub global activate flx
# Verify single installation
dart pub global list
3. "Flutter SDK conflict"â
āϏāĻŽāϏā§āϝāĻž: Flutter SDK version incompatibleāĨ¤
āϏāĻŽāĻžāϧāĻžāύ:
# Flutter version check āĻāϰā§āύ
flutter --version
# Flutter upgrade āĻāϰā§āύ
flutter upgrade
# Flutter doctor run āĻāϰā§āύ
flutter doctor
# Resolve any issues shown by flutter doctor
# Retry FLX installation
dart pub global activate flx
đ§š Clean Installationâ
Complete Cleanup and Reinstallâ
# 1. Uninstall existing FLX
dart pub global deactivate flx
# 2. Clean pub cache
dart pub cache clean
# 3. Remove pub cache directory (if necessary)
rm -rf ~/.pub-cache
# 4. Remove Flutter cache (if necessary)
flutter clean
# 5. Fresh installation
dart pub global activate flx
# 6. Verify installation
flx --version
flx --help
Verify Installationâ
# Check FLX version
flx --version
# Check installation path
which flx
# Test basic functionality
flx config
# Create test project āĻāĻŦāĻ verify
mkdir test_flx && cd test_flx
flx gen feature test
ls -la lib/features/test/
đ Alternative Installation Methodsâ
1. Git Installation (Development)â
# Clone repository
git clone https://github.com/your-repo/flx.git
cd flx
# Install dependencies
dart pub get
# Activate from source
dart pub global activate --source path .
# Verify
flx --version
2. Manual Installationâ
# Download pre-built binary (if available)
wget https://github.com/your-repo/flx/releases/download/v1.0.0/flx-linux-x64
chmod +x flx-linux-x64
sudo mv flx-linux-x64 /usr/local/bin/flx
# Verify
flx --version
3. Docker Installationâ
FROM dart:stable
# Install FLX CLI
RUN dart pub global activate flx
# Add pub cache to PATH
ENV PATH="${PATH}:/root/.pub-cache/bin"
# Verify installation
RUN flx --version
đ Troubleshooting Tipsâ
Debug Installationâ
# Verbose installation
dart pub global activate flx_cli --verbose
# Trace installation
dart pub global activate flx_cli --trace
# Check pub configuration
dart pub config
# Environment variables
env | grep -E "(DART|FLUTTER|PUB|PATH)"
System Informationâ
# Operating system
uname -a
# Dart SDK location
which dart
# Flutter SDK location (if applicable)
which flutter
# Available disk space
df -h
# Network connectivity
curl -I https://pub.dev
â Prevention Tipsâ
- Regular updates: Keep Dart/Flutter SDK updated
- Clean environment: Regular cache cleanup
- Version control: Document working versions
- Network stability: Ensure stable internet connection
- Antivirus exclusions: Add pub cache to exclusions
- Backup configuration: Save working environment settings
Installation āϏāĻŽāϏā§āϝāĻž solve āύāĻž āĻšāϞā§: GitHub Issues āĻ system information āϏāĻš report āĻāϰā§āύ! đ ī¸