Cabal 3.4.0.0 not changing from 3.2.0.0 (solved)

Using these commands:

ghcup upgrade (just to make sure ghcup is on the latest version)
ghcup install ghc 8.10.4
ghcup set ghc 8.10.4
ghc --version (just to check the correct version)
ghcup install cabal 3.4.0.0
ghcup set cabal 3.4.0.0
cabal --version (just to check the correct version)
cabal update (just to make sure all dependencies are in the info)

Some reason its showing this after setting cabal:

$ ghcup set cabal 3.4.0.0
[ Warn ] New GHC version available: 9.0.1. To upgrade, run ‘ghcup install ghc 9.0.1’
[ Info ] Cabal 3.4.0.0 successfully set as default version

$ cabal --version
cabal-install version 3.2.0.0
compiled using version 3.2.0.0 of the Cabal library

Solved the problem here is what I did:

https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node
search “cabal”

Changed the paths after using “ghcup” to install ghc & cabal

echo PATH="$HOME/.local/bin:$PATH" >> $HOME/.bashrc
echo export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" >> $HOME/.bashrc
echo export NODE_HOME=$HOME/cardano-my-node >> $HOME/.bashrc
echo export NODE_CONFIG=mainnet>> HOME/.bashrc echo export NODE_BUILD_NUM=(curl https://hydra.iohk.io/job/Cardano/iohk-nix/cardano-deployment/latest-finished/download/1/index.html | grep -e “build” | sed ‘s/.build/([0-9])/download.*/\1/g’) >> $HOME/.bashrc
source $HOME/.bashrc

I had the same problem and it was driving me crazy. It was only happening on my BP machine. I had found a copy of the cabal executable in another bin folder. I’m not completely sure how it got there but I think your solution explains it a bit.

Yes I found a copy of cabal inside of .local/bin

I deleted that, reinstalled Cabal and copied the new path inside of .bashrc and it fixed the problem.

the GHCUP method puts it in .ghcup

Thanks Anti.biz and jeremyisme…but I’m still confused as to what to do. I am having the exact same problem. Namely, that my cabal --version is showing 3.2 even though I am following steps here:

Can you please explain step by step what to do to resolve this. Like Jeremy, it is also driving me bonkers. :slight_smile:

I am not following here either. What should the paths be changed to?

cntools or coincashew?
also can u share the last lines (export lines) from bashrc file?

nano ${HOME}/.bashrc

Cheers,

Okay was able to fix it myself by clearing out the old ghc and cabal versions then updating PATH. Instructions below :slight_smile:

STEPS --------------------
CABAL FIX***
sudo rm -rf /home/cardano/.local/bin/cabal
Update Path in .bashrc → ADD /home/cardano/.ghcup/bin/cabal

GHC FIX ****
sudo rm -rf /usr/local/bin/ghc
Update Path in .bashrc → ADD /home/cardano/.ghcup/bin/ghc

GHCUP REINSTALL
curl --proto ‘=https’ --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
Options
1.P
2.N
3.N
source /home/cardano/.ghcup/env OR restart terminal session

source .bashrc
ghc --version
cabal --version

1 Like