본문 바로가기

server/linux

ubuntu 20.04에서 riscv-gnu-toolchain 설치 에러 해결

728x90

우분투 20.04에서 riscv-gnu-toolchain 메뉴얼을 따라하다보면 아래와같은 에러와 마주친다.

test@test:~/riscv-gnu-toolchain$ git submodule update --init --recursive
error: Server does not allow request for unadvertised object beb2cdbcda911764b2bed5e57921fe90493260bd
Fetched in submodule path 'binutils', but it did not contain beb2cdbcda911764b2bed5e57921fe90493260bd. Direct fetching of that commit failed.

 

 

Error Fetching Submodule in RISC-V GNU Toolchain: Server Does Not Allow Request for Unadvertised Object

OS:Ubuntu20.04LTS Description: I followed the instructions in the riscv-gnu-toolchain README. First, I ran: git clone https://github.com/riscv/riscv-gnu-toolchain I installed the required dependen...

stackoverflow.com

 

이유와 해결방법은 위의 답변에 상세하게 적혀있었다.

허나 나는 해당 답변의 솔루션인

git config --global protocol.version 2

명령어를 사용해서 프로토콜을 강제로 버전업 시키는방법은 되지않았다.

 

어쨌든 이유는 ubuntu 20.04의 깃의 버전이 낮아서 생기는 문제니 git version을 올려보기로한다.

그냥 냅다 apt update 해봤자 2.25.1에서 더이상 올라가지않는다.

sudo add-apt-repository ppa:git-core/ppa
sudo apt upgrade

 

만약 add-apt-repository의 커맨드를 찾지 못한다면 sudo apt install software-properties-common를 이용해 툴 설치후 다시 진행한다. 

현재 최신 버전으로 업그레이드가 완료되었다.

이후 재부팅 후에 다시

git clone --recursive https://github.com/riscv/riscv-gnu-toolchain

 

받으면 에러없이 실행된다.

728x90