과도한 의존성을 피하는 방법

과도한 의존성을 피하는 방법

SSD 하드 드라이브가 제한되어 있습니다. 따라서 Ubuntu에 소프트웨어를 설치할 수 없습니다.

방금 아주 간단한 애플리케이션을 설치하려고 했습니다.텍스메이커

sudo apt-get install texmaker
[sudo] password for arash: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  asymptote asymptote-doc ibus-qt4 libgsl0ldbl libibus-qt1 libpoppler-qt4-4
  preview-latex-style psutils texlive-lang-english texlive-latex-extra
  texlive-latex-extra-doc texlive-pictures texlive-pictures-doc texmaker-data
Suggested packages:
  gv xpdf gsl-ref-psdoc gsl-doc-pdf gsl-doc-info gsl-ref-html python-pygments
  dot2tex libtcltk-ruby texlive-lang-all
The following NEW packages will be installed:
  asymptote asymptote-doc ibus-qt4 libgsl0ldbl libibus-qt1 libpoppler-qt4-4
  preview-latex-style psutils texlive-lang-english texlive-latex-extra
  texlive-latex-extra-doc texlive-pictures texlive-pictures-doc texmaker
  texmaker-data
0 to upgrade, 15 to newly install, 0 to remove and 6 not to upgrade.
Need to get 454 MB of archives.
After this operation, 665 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.

왜 그렇게 큰 의존성이 있습니까? 정말 모두 필요한가요? 소프트웨어를 더 가볍게 설치할 수 있는 방법이 있나요?

답변1

Texmaker는 특별한 경우입니다. 그것을 패키징한 사람이 누구든 LaTeX 문서를 생성하고 컴파일하는 데 사용될 것이라고 올바르게 가정했기 때문에TexLive를 권장 종속성으로 표시했습니다.. TexLive는 약간 괴물입니다. 전체 패키지 제품군은 1GB가 넘습니다. Texmaker는 대부분의 사용자 요구 사항을 충족하는 가장 일반적인 모듈을 표시합니다.

apt권장 패키지 없이 Texmaker를 설치하도록 지시할 수 있습니다 .

sudo apt-get --no-install-recommends install texmaker

이제 Texmaker를 설치해야 하지만 LaTeX 문서를 컴파일할 수 없습니다. 이를 위해서는 TexLive를 설치해야 합니다. 다행스럽게도,패키지 texlive는 종속성을 거의 표시하지 않습니다.:

sudo apt-get install texlive

이렇게 하면 최소한의 컴파일러가 제공되며 많은 일반적인 LaTeX 모듈과 글꼴을 사용할 수 없습니다.

기본 패키지에 없는 LaTeX 모듈이 필요한 경우 가장 좋은 대안은 다음을 수행하는 것입니다.CTAN에서 TexLive를 수동으로 설치그리고 사용tlmgr체리를 선택하려면 필요한 모듈을 선택하세요.

답변2

보시다시피 상황에 따라 다릅니다...
종속성이 없는 새로운 Ubuntu 설치에 첫 번째 응용 프로그램 중 하나를 설치할 때 일부 종속성이 필요할 것이라고 가정할 수 있습니다.

하지만 시간이 지나면서 의존성이 apt-get중복되어 필요한 경우가 많아지고 다시 다운로드할 필요가 없게 됩니다.

예를 들어

  • 앱 A에는 종속성 [ "dep3", "dep6", "dep87", "dep45" ] = 1000MB가 필요합니다.
  • 앱 B에는 종속성[ "dep3", "dep6", "dep87" ] = 2MB가 필요합니다. 일부는 이미 설치되어 있기 때문입니다.

관련 정보