"Hello World fails to compile"

Greetings to everyone.

Operating System: Linux Mint 20.3
Kernel: Linux 5.4.0-96-generic
Architecture: x86-64

Recently I installed Rust Language.
I tried to cargo run "Hello World", however it failed to compile giving back the following:
= note: /usr/bin/ld: cannot find Scrt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status

I did found a relative thread (Aug 15) about that and I found that build-essential package installation could deal the issue.
However when I entered the command:
sudo apt-get install build-essential
I got the following feedback:
The following packages have unmet dependencies:
build-essential : Depends: libc6-dev but it is not going to be installed or libc-dev
Depends: g++ (>= 4:9.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

If anyone could help me I would appreciate that.
Yours sincerely, SioU!

Seems like you have somehow screwed up your packages. For fixing such kinds of problems, it is best to ask in the distro-specific forum. In your case, it would be the Linux Mint Forum.


Thank you very much for your immediate response.
I already have asked about it and I am standing by for their response.
If I find any solution I will be more than grateful to share it!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.