windows11 ubuntu rustc linker `cc` not found error 관련

chichi·2023년 12월 26일
0

windows11 ubuntu rustc linker cc not found error 관련

상황

$:~/projects/hello_world$ rustc main.rs
error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

실패

$:~/projects/hello_world$ sudo apt install build-essential cmake

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/glibc/libc-devtools_2.35-0ubuntu3.4_amd64.deb  404  Not Found [IP: ㅌㅌ.ㅌㅌ.ㅌㅌ.ㅌㅌ ㅌㅌ]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

$:~/projects/hello_world$ sudo sudo apt install build-essential
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/glibc/libc-devtools_2.35-0ubuntu3.4_amd64.deb  404  Not Found [IP: ㅌㅌ.ㅌㅌ.ㅌㅌ.ㅌㅌ ㅌㅌ]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

성공

seongho@DESKTOP-4PU41RU:~/projects/hello_world$ sudo apt-get update
seongho@DESKTOP-4PU41RU:~/projects/hello_world$ sudo apt install build-essential
seongho@DESKTOP-4PU41RU:~/projects/hello_world$ rustc main.rs
seongho@DESKTOP-4PU41RU:~/projects/hello_world$ ls
main  main.rs
seongho@DESKTOP-4PU41RU:~/projects/hello_world$ ./main
Hello, world!
seongho@DESKTOP-4PU41RU:~/projects/hello_world$

후기

  1. 에러가 나면 안내문을 잘 읽자.
  2. 다운로드가 안되면 그 기반이 되는 부분의 업데이트를 진행 해 보자.
profile
번역글 위주로 다루려 합니다. 오역 및 기타 사항은 해당 게시글에 댓글로 남겨주시면 답변드리겠습니다. 좋은 하루 되세요!

0개의 댓글