Rust를 설치하지 않고 Alacritty 설치하기

Rust를 설치하지 않고 Alacritty 설치하기

2022-10-13 last update

5 minutes reading alacritty terminal rust docker
일주일 전에 또 Alacritty's project homepage 에 와서 다시 설치하고 싶었지만 빌드를 해야 한다는 글을 읽고 낙담했습니다.

나는 옛날에 물건을 만들곤 했습니다. (저는 소스에서 컴파일하는 것을 정말로 좋아했다고 말하지는 않겠지만, 저는 i 이전의 세계에 살았을 만큼 충분히 늙었지만, 점점 더 저는 물건을 설치하는 것의 편리함을 선호합니다. 내 컴퓨터에 모든 개발 도구를 설치할 필요 없이

Rust의 Docker 이미지 설명에서 Compile your app inside the Docker container 라는 제목의 섹션을 찾을 수 있습니다. 이것은 정확히 제가 하고 싶었던 것이지만 두 개의 lxcb 라이브러리가 포함되어 있지 않기 때문에 문제가 있을 것입니다.

  = note: /usr/bin/ld: cannot find -lxcb-shape
          /usr/bin/ld: cannot find -lxcb-xfixes
          collect2: error: ld returned 1 exit status

error: could not compile `alacritty` due to previous error



나는 이미 이것으로 시작했으므로 일부 구성을 위해 조금 출발할 것이지만 본질적으로 동일합니다.
  • 이미지를 사용하여 화물을 실행하는 대신 쉘 콘솔을 직접 엽니다.

  • docker run --rm -it -v (pwd):/backup rust /bin/bash
    


  • 소스를 업데이트하고 lxcb 개발 라이브러리를 설치합니다.

  • # You are already root inside the container
    apt-get update
    
    # This is the only lib missing from Alacritty's build pre-requisites
    apt-get install libxcb-xfixes0-dev
    
    # Now compile, you can use the more concise command from Rust's image description
    cargo install alacritty
    # I mounted my home dir as /backup
    cp /usr/local/cargo/bin/alacritty /backup/alacritty
    


  • 컨테이너 외부에서 alacrittyPATH에 포함된 일부 디렉토리에 복사해야 합니다. 저는 다음을 사용했습니다.

  • sudo mv alacritty /usr/local/bin/alacritty
    



    마지막으로 주의할 점은 build instructions 에 명시된 대로 terminfo 파일, 데스크탑 항목, 매뉴얼 페이지 또는 셸 완성은 설치되지 않지만 작동하는 데 어렵지는 않을 것입니다.