The problem looks much worse than only not being able to get a graphical
session. You cannot even use 'apt-get'. It looks like the problem I faced
when upgrading Trisquel 7 with this PPA:
https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
I ended up doing a fresh install. See for my advice ("a fresh install after
a backup of what matters") when the package manage is not functional:
https://trisquel.info/forum/trisquel-8-codename-flidas-release-candidate-ready-testing#comment-130966
Right below that post, you can read how davidpgil did not follow that advice
but fixed his system using the 'dpkg' low-level interface to the package
manager. You can give it a try.