Maybe try to sudo apt install gdb and if that does not work, try to sudo apt update && sudo apt upgrade first.
Seth
P.S. What does df -h show on your board? If you have a lack of space, there is a script. sudo /opt/scripts/tools/grow_partition.sh First use git pull in the /opt/scripts/tools/ directory.
I tried apt update, apt clean and it did not work. I needed to create more space, so by deleting some of the log files I was able to create the space and it installed.
So I think the issue is that there simple is not enough space available.
So using putty I used the du -h command to examine the disc usage. I realized that there was a log directory that was using most of the space. I then deleted the log directory using rm -r dirname
That freed up a lot of space and I was then able to install.
So it is really due to the space available and apt autoclean does not create enough space you probably need more.
Sir…if you are using the SD Card instead of the eMMC onboard the BBBW, that script will get you to inflate the SD Card to its normal use size. So, instead of using the eMMC or a SD Card at 3.5 GB, one could use a SD Card of 32, 16, etc. sized memories.
I just thought a reminder would be nice for people just jumping in.
Seth
P.S. Okay… du is a good command/tool. I used du the other day to find the root cause of my woes w/ memory onboard a SD Card and the BBAI. I found nothing unreasonable. I soon found out that my 1 GB of ram is not enough for some heavy duty compiling on the board. Although, it is more than 256MB, it still could not do the job. Luckily, I will cross compile and change ways of pushing ideas on to that specific board.