Address already in use (os error 48). dfx start --clean not working

Im getting this error when trying to run the dfx start command. I’ve tried running the dfx start --clean command to resolve this. I’ve also tried deleting the .dfx file, and haven’t had any luck with any of them. does anyone know of a cause and/or solution to this error?

Had this persistent issue, what worked was forcing an update to 0.8.3 and restarting my OS.
Run the first one to check your version. Second command to update.

dfx --version
DFX_VERSION=0.8.3 sh -ci “$(curl -fsSL https://sdk.dfinity.org/install.sh)”

Hope it works for you.

+1
In my case I am doing a reinstall (uninstall, kill process and install again)

~/.cache/dfinity/uninstall.sh
ps aux | grep 8000 // process might be already stopped, but whatever
kill -9 *pid*
sh -ci "$(curl -fsSL https://smartcontracts.org/install.sh)"

because if you just kill the process - dfx starts it again

1 Like

Anytime I get this error, it is from me not stopping any dfx instances already running(even if from a separate terminal). After entering ‘dfx stop’, it clears up.

1 Like