如何在没有 GUI 的情况下安装 Libre Office

如何在没有 GUI 的情况下安装 Libre Office

我使用 python 和 Open Document Files 从 CRM 生成文档,然后将其转换为 PDF 格式。在此配置中,Libre Office 作为服务运行。它在我的桌面开发计算机上完美运行,没有任何问题。

生产环境将是没有 GUI 的 12.04 服务器,我不想被迫安装 Gnome 或 KDE。有没有办法将 Libre Office 的某种核心安装到没有 GUI 的服务器上?

答案1

Libreoffice 软件包依赖于libreoffice-core,并且libreoffice-core单独拖拽了 90 多个软件包:

# apt-get install libreoffice-core --no-install-recommends
Reading package lists... Done
Building dependency tree       
Reading state information... Done    
The following extra packages will be installed:
  fontconfig fontconfig-config fonts-dejavu-core fonts-opensymbol
... snip ...
The following NEW packages will be installed:
  fontconfig fontconfig-config fonts-dejavu-core fonts-opensymbol
  gconf-service gconf-service-backend gconf2-common libatk1.0-0 libatk1.0-data
  libavahi-client3 libavahi-common-data libavahi-common3
  libboost-date-time1.54.0 libcairo2 libclucene-contribs1 libclucene-core1
  libcmis-0.4-4 libcolamd2.8.0 libcups2 libdatrie1 libexttextcat-2.0-0
  libexttextcat-data libfontconfig1 libgconf-2-4 libgdk-pixbuf2.0-0
  libgdk-pixbuf2.0-common libgl1-mesa-glx libglapi-mesa libglu1-mesa
  libgraphite2-3 libgtk2.0-0 libgtk2.0-common libharfbuzz-icu0 libharfbuzz0b
  libhunspell-1.3-0 libhyphen0 libice6 libicu52 libjasper1 libjbig0
  libjpeg-turbo8 libjpeg8 liblangtag-common liblangtag1 liblcms2-2 libltdl7
  libmhash2 libmythes-1.2-0 libneon27-gnutls libnspr4 libnss3 libnss3-nssdb
  libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpixman-1-0
  libraptor2-0 librasqal3 librdf0 libreoffice-common libreoffice-core
  libreoffice-style-galaxy libsm6 libthai-data libthai0 libtiff5 libx11-xcb1
  libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-render0
  libxcb-shm0 libxcb-sync1 libxcomposite1 libxcursor1 libxdamage1 libxfixes3
  libxi6 libxinerama1 libxrandr2 libxrender1 libxshmfence1 libxslt1.1 libxt6
  libxxf86vm1 libyajl2 lp-solve uno-libs3 ure x11-common
0 upgraded, 91 newly installed, 0 to remove and 0 not upgraded.
Need to get 68.6 MB of archives.
After this operation, 271 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

因此,您不能安装更少的软件包。该libreoffice软件包引入了大约 30 个软件包。但是,如果您不安装集成软件包(libreoffice-gnomelibreoffice-kde),则不会引入 GNOME/KDE 组件。不libreoffice依赖于这些集成软件包,因此您只需安装 即可libreoffice

apt-get install libreoffice --no-install-recommends

答案2

现在(从 Ubuntu 20.04 开始,可能更早)有

libreoffice-core-nogui

进一步减少依赖性的软件包。它将删除并替换一些模块:

libreoffice-base libreoffice-calc libreoffice-core libreoffice-math libreoffice- pdfimport libreoffice-writer

答案3

该软件包libreoffice不依赖于 Gnome、KDE ​​或 Xorg(参见Ubuntu 软件包)。

为了保持安装最小化,您可以不安装任何推荐的东西:

apt-get --no-install-recommends install libreoffice 

相关内容