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
cmake
rather thangcc
sosudo apt install cmake
did the trickI tried that, but it’s already installed.
You’ll need to install
gcc
to build Alacritty.Try running
apt install build-essential
.I can run
cc --version
without any issue, so it must be installed. I guesscargo
can’t find it for some reason?looks like i missed
libxcb-xfixes0-dev
sorry 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
gcc
is 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
rustup
first, if thecurl
method doesn’t work, you can try download manual install guiderustup toolchain list
to see if your installation matches your os. from my experience, it should be something likex86_64-unknown-linux-gnu
I’ve just verified that I can build Alacritty on Ubuntu 18.04. Could you run and show the output of:
uname -a
lsb_release -a
alias
echo $PATH
ls -l /usr
I 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 cc
gives you? Is there anything special about the way you build Alacritty? Anything that could have an effect on$PATH
or something like that?I’d make sure
build-essential
,gcc
,cc
,cmake
andmake
are all up to date. Those are the main build tools I can think of which could be related to this. And make sure noclang
is installed just because it might mess with things.