alacritty: "error: linker `cc` not found" on Ubuntu 18.04 LTS, using X11
On Ubuntu 18.04 LTS, using X11.
When installing alacritty via cargo 1.27.0 (1e95190e5 2018-05-27) I get the following error:
Compiling cc v1.0.17
Compiling bitflags v1.0.3
Compiling pkg-config v0.3.11
Compiling lazy_static v1.0.1
Compiling khronos_api v2.2.0
Compiling downcast-rs v1.0.3
error: linker `cc` not found
|
= note: No such file or directory (os error 2)
error: aborting due to previous error
error: Could not compile `khronos_api`.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `alacritty v0.1.0 (https://github.com/jwilm/alacritty#7cc9c11b)`, intermediate artifacts can be found at `/tmp/cargo-installxyENm0`
Caused by:
build failed
I’ve tried a few things, like wiping out ~/.cargo and ensuring my cargo is up to date, but nothing I did seemed to help.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 35 (10 by maintainers)
for me it was I didn’t have
cmakerather thangccsosudo apt install cmakedid the trickI tried that, but it’s already installed.
You’ll need to install
gccto build Alacritty.Try running
apt install build-essential.I can run
cc --versionwithout any issue, so it must be installed. I guesscargocan’t find it for some reason?looks like i missed
libxcb-xfixes0-devsorry about that(I spent way too long on this page)
Summary
And if that doesn’t work, check these:
@MavenRain Please make sure you’ve followed all the troubleshooting steps in this issue.
The most likely cause for this is that
gccis not installed on your system.Just in case someone has the same problem:I had the same problem under Ubuntu 18.04LTS, but for me this was solved after adding some missing entries to my PATH variable which were set in bash, but not in fish.Edit: I forgot to clean and recompile…
For me the build somehow works in bash, but not in fish, even after setting the path to the same value.
@AchalaSB Try installing
gcc.@Asuza you should install the
rustupfirst, if thecurlmethod doesn’t work, you can try download manual install guiderustup toolchain listto see if your installation matches your os. from my experience, it should be something likex86_64-unknown-linux-gnuI’ve just verified that I can build Alacritty on Ubuntu 18.04. Could you run and show the output of:
uname -alsb_release -aaliasecho $PATHls -l /usrI am not sure what the issue could be, but maybe this information can help to diagnose it.
Hmm, super odd. What’s the path
which ccgives you? Is there anything special about the way you build Alacritty? Anything that could have an effect on$PATHor something like that?I’d make sure
build-essential,gcc,cc,cmakeandmakeare all up to date. Those are the main build tools I can think of which could be related to this. And make sure noclangis installed just because it might mess with things.