-
安装编译工具和依赖项:
sudo apt update sudo apt install build-essential git automake autoconf libtool pkg-config libkrb5-dev libpam0g-dev libcap-dev libssl-dev libxml2-dev libxslt1-dev libpng-dev libtiff-dev libjpeg-dev libltdl-dev libreadline-dev libcups2-dev libffi-dev liblcms2-dev libsqlite3-dev libicu-dev libegl1-mesa-dev libgles2-mesa-dev libgstreamer-plugins-base1.0-dev liborc-0.4-dev libgstreamer1.0-dev libdbus-1-dev libdbus-glib-1-dev libxrandr-dev libxinerama-dev libxext-dev libxi-dev libxt-dev libpulse-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libx264-dev libx265-dev libvpx-dev libopus-dev libspeex-dev libopenjpeg-dev libraw-dev libwebp-dev
-
获取 LibreOffice 源代码:
git clone --depth=1 https://github.com/LibreOffice/core.git libreoffice
-
进入源代码目录并配置构建选项:
cd libreoffice ./autogen.sh ./configure --with-distro=LibreOfficeLinuxAMD64 --disable-online-help --disable-report-builder --disable-epm --disable-gtk3 --without-junit --without-system-harfbuzz --disable-coinmp --disable-extension-integration --disable-mozilla --without-java --without-myspell-dicts --without-help --without-myspell-dicts --without-doxygen --without-krb5 --without-gssapi --without-system-postgresql --without-fontconfig --without-gconf --disable-lpsolve --disable-fpicker --disable-extension-update --disable-python --disable-firebird-sdbc --disable-kde4 --disable-odk --disable-vlc --disable-cairo-canvas --disable-gtk --disable-gio --without-system-dicts --without-system-lpsolve --without-system-mariadb --without-system-mysql --without-system-mysql-connector-c --without-system-openldap --without-system-openssl --without-system-vigra --without-system-w3c-libwww --without-system-odbc --disable-cups --disable-gstreamer-0-10 --without-system-jars --without-system-neon --without-system-libs --without-system-saxon --without-system-samba --disable-gconf --disable-gtk3 --disable-gstreamer-1-0 --without-mozilla --without-fonts --without-krb5 --disable-scripting-beanshell --disable-scripting-javascript --disable-scripting-python --without-java --disable-sdremote --disable-sdremote-bluetooth --disable-sdremote-usb --without-helppack-integration --without-doxygen --disable-debug --with-theme=libo_human
-
开始编译:
make
-
这个过程可能需要几个小时才能完成,具体时间取决于您的计算机性能。
-
安装
sudo make install
-
运行
/usr/local/libreoffice/program/soffice
- 以上是在 Ubuntu 20.04 上编译和安装 LibreOffice 的基本步骤,具体细节可能会因不同的环境而异。如果您在其他操作系统或环境上进行编译,请参考 LibreOffice 的官方文档或社区支持论坛,以获取适合您环境的详细指导。
注意
- 请注意,在运行此命令之前,您需要在配置步骤中指定安装路径。如果未指定路径,则默认安装到 /usr/local/libreoffice/ 目录下。
文章评论