Cabal won't update, stuck on 3.2.0.0

Hello everyone,

I’m following the update guide here:

I’ve used the CoinCashew guide for both my block and relay nodes. I am trying to update my block node using the following steps
ghcup upgrade
ghcup install ghc 8.10.4
ghcup set ghc 8.10.4
ghcup install cabal 3.4.0.0
ghcup set cabal 3.4.0.0
cabal update
ghc --version
cabal --version

All goes well but when I go to check my cabal it still shows 3.2.0.0.

Rechecking my steps I ran ‘ghcup install cabal 3.4.0.0’ and it says:

[ Warn ] Cabal ver 3.4.0.0 already installed; if you really want to reinstall it, you may want to run ‘ghcup install cabal --force 3.4.0.0’

So it seems like it’s installed, but, again, running the ‘cabal–version’ command it states:
cabal-install version 3.2.0.0
compiled using version 3.2.0.0 of the Cabal library

Any help or suggestions would be greatly appreciated.

Thanks!

nano $HOME/.bashrc

and share the export lines (last lines). Hide the username

Hi Alex. Thanks for responding. You’re always so helpful brother. Wishing you good karma.

Here are the last export lines:

export CARDANO_NODE_SOCKET_PATH=/home/xxxxxxxxxx/cardano-node/db/socket
export CARDANO_NODE_SOCKET_PATH=/home/xxxxxxxxxx/cardano-node/db/socket
[ -f “/home/xxxxxxxxxx/.ghcup/env” ] && source “/home/xxxxxxxxxx/.ghcup/env” # ghcup-env
PATH=/home/xxxxxxxxxx/.local/bin:/home/xxxxxxxxxx/.cabal/bin:/home/xxxxxxxxxx/.ghcup/bin:/home/xxxxxxxxxx/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/g>
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib:
export NODE_HOME=/home/xxxxxxxxxx/cardano-node
export NODE_CONFIG=mainnet
PATH=/home/xxxxxxxxxx/.local/bin:/home/xxxxxxxxxx/.local/bin:/home/xxxxxxxxxx/.cabal/bin:/home/xxxxxxxxxx/.ghcup/bin:/home/xxxxxxxxxx/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/>
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib:/usr/local/lib:
export NODE_HOME=/home/xxxxxxxxxx/cardano-node
export NODE_CONFIG=mainnet

hmm, u have so much lines there… u should delete the duplicated lines

also can u delete all lines except

export CARDANO_NODE_SOCKET_PATH=/home/xxxxxxxxxx/cardano-node/db/socket
[ -f “/home/xxxxxxxxxx/.ghcup/env” ] && source “/home/xxxxxxxxxx/.ghcup/env” # ghcup-env

save the file and run again the commands


cd $HOME
source .bashrc
ghcup upgrade
ghcup install cabal 3.4.0.0
ghcup set cabal 3.4.0.0

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
source $HOME/.bashrc

Well…the good news is my bashrc file is a lot cleaner. :slight_smile:

Still seeing cabal 3.2.0.0 though. When I ran the ghcup upgrade command it said
‘No GHCup update available’

When I ran the ghcup install cabal 3.4.0.0 command it also said
'Cabal ver 3.4.0.0 already installed; if you really want to reinstall it, you may want to run ‘ghcup install cabal --force 3.4.0.0’…but I did not do a force reinstall this time.

I also rebooted, just in case. No luck.

Check this topic

Thanks Alex. I wasn’t entirely clear on what the fix was from that thread, but I saw that Anti-biz said he “found a copy of cabal inside of .local/bin”…and deleted it.

So I did that. Ran these commands again:

cd $HOME
source .bashrc
ghcup upgrade
ghcup install cabal 3.4.0.0
ghcup set cabal 3.4.0.0

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
source $HOME/.bashrc

And it’s working now!

Thanks again for your help! It was driving me just a little bit crazy. :slight_smile:

2 Likes

Yep, just delete the extra version in .local/bin then use ghcup to install and set cabal to the right version. That’s the short answer.