在Linux Ubuntu上安装 /构建最新版本的Inkscape(v 1.2)20.04

发布于 2025-01-22 03:29:58 字数 189 浏览 2 评论 0原文

我正在尝试在Linux Ubuntu 20.04上安装Inkscape 1.2beta。该网站当前仅提供适应性和源头粉。由于我想通过命令行访问inkscape的最新功能,因此我需要构建和安装源tarball。

install.md指出,在安装之前,我需要所有的子模块和依赖项。

我如何找到这些依赖项可以成功构建和安装inkscape?

I am trying to install Inkscape 1.2beta on Linux Ubuntu 20.04. The website currently only offers an AppImage and a source tarball. Since I would like to access the newest features of Inkscape via the command line, I need to build and install the source tarball.

INSTALL.md states that I need all submodules and dependencies before install.

How do I find these dependencies to successfully build and install Inkscape?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

凡尘雨 2025-01-29 03:29:58

此列表应满足linux ubuntu的所有必要依赖性:

apt install

cmake

imagemagick
libdouble-conversion-dev
libgdl-3-dev
libagg-dev
libpotrace-dev
libboost-all-dev
libsoup2.4-dev
libgc-dev
libwpg-dev
poppler-utils
libpoppler-dev
libpoppler-glib-dev
libpoppler-private-dev
libvisio-dev libvisio-tools
libcdr-dev
libgtkmm-3.0-dev
libgspell-1-dev
libxslt-dev libxslt1-dev
libreadline6-dev
lib2geom-dev

求解错误”< ieeefp.h>

对于构建Inkscape:

从inkscape.org下载inkscape v1.2的源tarball,

cd <extracted inkscape directory>
mkdir build && cd build
cmake ..
make
make install

如果您在cmake期间仍然遇到错误。.,请在下面评论错误消息中缺少模块的名称。

This list should satisfy all required dependencies on Linux Ubuntu:

apt install

cmake

imagemagick
libdouble-conversion-dev
libgdl-3-dev
libagg-dev
libpotrace-dev
libboost-all-dev
libsoup2.4-dev
libgc-dev
libwpg-dev
poppler-utils
libpoppler-dev
libpoppler-glib-dev
libpoppler-private-dev
libvisio-dev libvisio-tools
libcdr-dev
libgtkmm-3.0-dev
libgspell-1-dev
libxslt-dev libxslt1-dev
libreadline6-dev
lib2geom-dev

lib2geom-dev is needed to solve error "<ieeefp.h> not found".

For building Inkscape:

Download source tarball for Inkscape v1.2 from inkscape.org and extract

cd <extracted inkscape directory>
mkdir build && cd build
cmake ..
make
make install

If you still get an error during cmake .., please comment below with the names of the missing modules in the error message.

还如梦归 2025-01-29 03:29:58

有关如何构建inkscape(和依赖项)的详细信息可以在 repository 本身,或 inkscape网站(为了完成此处,从此处复制了步骤):

  • 获取最新的源代码,使用以下命令(下载到您当前工作目录的子目录中,称为“ Inkscape”):默认情况下):
git clone --recurse-submodules https://gitlab.com/inkscape/inkscape.git

稍后更新此代码,请更改为下载文件夹并使用:

git pull --recurse-submodules && git submodule update

默认情况下,Git将下载每个分支机构和每个分支犯罪。如果您在慢速机器上,磁盘空间有限或Internet带宽有限,则可以使用浅克隆和单个分支克隆选项来限制它将下载的数据量:

git clone --depth=1 --single-branch --recurse-submodules --shallow-submodule https://gitlab.com/inkscape/inkscape.git

在Linux上构建InkScape在Linux上

打开一个终端 。您在上一步中下载源代码的文件夹。

安装构建依赖项

下载并运行脚本以安装编译Inkscape所需的一切(检查脚本以查看您的发行版是否支持):

wget -v https://gitlab.com/inkscape/inkscape-ci-docker/-/raw/master/install_dependencies.sh -O install_dependencies.sh
bash install_dependencies.sh --recommended

与CMAKE编译

,请执行以下操作:

mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=${PWD}/install_dir -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
make -j8
make install

注意:

  • 使用ccache是可选的但是加快了汇编。
  • 可选的-j8参数要告诉它并并行运行8个作业。请随时将其调整为计算机上可用的硬件线程(物理内核)的数量。
  • 推荐的-dcmake_install_prefix参数允许指定自定义的隔离安装位置(在上面的install> install_dir/内部内部内部的示例中)。它避免安装到系统位置(可能与其他版本的inkscape冲突),并允许并行运行多个版本的inkscape。它仍将使用所有文件(包括preverences.xml),该文件位于〜/.config/inkscape目录中。

运行它:

从构建目录

install_dir/bin/inkscape

The details on how to build Inkscape (and the dependencies) could be found in the repository itself, or Inkscape website (For completness, the steps are copied from the website here):

  • To obtain the latest source code, use the following command (downloads into a subdirectory of your current working directory called "inkscape" by default):
git clone --recurse-submodules https://gitlab.com/inkscape/inkscape.git

To update this code later, change into the download folder and use:

git pull --recurse-submodules && git submodule update

By default, git will download every branch and every commit. If you are on a slow machine, have limited disk space, or limited internet bandwidth, you can use shallow clone and single branch clone options to limit the amount of data it will download:

git clone --depth=1 --single-branch --recurse-submodules --shallow-submodule https://gitlab.com/inkscape/inkscape.git

Building Inkscape on Linux

Open a terminal at the root of the folder into which you downloaded the source code in the previous step.

Install build dependencies

Download and run the script to install everything required for compiling Inkscape (check script to see if your distribution is supported):

wget -v https://gitlab.com/inkscape/inkscape-ci-docker/-/raw/master/install_dependencies.sh -O install_dependencies.sh
bash install_dependencies.sh --recommended

Compile

To compile with CMake, do the following:

mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=${PWD}/install_dir -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
make -j8
make install

Notes:

  • Using ccache is optional but speeds up compilation.
  • The optional -j8 argument to make tells it to run 8 jobs in parallel. Feel free to adjust this to the number of hardware threads (physical cores) available on your computer.
  • The recommended -DCMAKE_INSTALL_PREFIX argument allows to specify a custom isolated installation location (in the example above install_dir/ inside the build folder). It avoids installation into system locations (where it could conflict with other versions of Inkscape) and allows running multiple versions of Inkscape in parallel. It will still use all the files (including the preferences.xml) that reside in the ~/.config/inkscape directory.

Run

Run it from the build directory:

install_dir/bin/inkscape
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文