collect2: fatal error: cannot find 'ld' after restarting Clion Ubuntu 16.04

Hello, when I installed Clion everything works well but after restarting Clion this error occurs "collect2: fatal error: cannot find 'ld' "(the error occurs at the linking stage). And when I build my project in the terminal everything is compiled and linked. Unfortunately I did not find a way to solve this problem, except for reinstalling Clion. (But I can not do this every time)

Also when this problem occurs, for some reason Clion can not detect Make; C Compiler;  C++ Compiler. And Test Cmake run finished with erors:

 

CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

Error code: 1

 

And when I try to configure all 3 items manually, by writing the same paths to them that Clion detected after installation, I get an error that they are not available or broken.

 

Please help(

0
2 comments
Avatar
Permanently deleted user

Now I found that if I run Clion through the terminal from the directory where Clion is located. Everything is ok, but if I run it from Desktop Entry occurs this errors.

Is it Bug?

0

Hi! Please try restarting CLion via File | Invalidate Caches/Restart. This command will clean the system cache.

If the issue persists, please send idea.log (Help | Show Log in Finder) to clion-support at jetbrains.com. Also please provide us with the following details: Do you use the bundled CMake or custom? Do you pass any compiler parameters via CMakeLists.txt or via File | Settings | Build, Execution, Deployment | CMake? Does the error happen with the default "Hello, World!" project?

0

Please sign in to leave a comment.