1

我未能在 R(Termux) 上安装 Cairo 包:

install.packages('Cairo')

因为它没有找到freetype支持:

configure: error: Cannot use cairo-ft backend, 
although cairo claims it is working. Please check 
your caito installation and/or update cairo if 
necessary or set CAIRO_CFLAGS/CAIRO_LIBS 
accordingly.
ERROR: configuration failed for package ‘Cairo’
* removing  
 ‘/data/data/com.termux/files/usr/lib/R/library/Cairo’
sh: ȫ�: not found

我在这里读到在 R 上安装 Cairo,OP 必须使用 --enable-ft=yes 重新编译 cairo。'。我需要知道这是否可以解决 R 上的安装失败以及如何在 Termux 上进行安装。

4

2 回答 2

0

尝试这个:

export LD_LIBRARY_PATH=$PREFIX/lib
export CAIRO_INCLUDE_PATH=$PREFIX/include/cairo
export CAIRO_CFLAGS=-I$PREFIX/include/cairo
export CAIRO_LIBS='-L$PREFIX/lib -lcairo'
于 2019-08-03T13:28:21.890 回答
0

我想为不同的目的构建 cairo,但也遇到了找不到 freetype 库的问题。

首先,cairo'sconfigure正在打印checking for FREETYPE...,但它实际上并不是在寻找FREETYPEfreetype,它正在寻找freetype2

其次,freetype 库有 2 个版本控制系统(一个返回 2.X,另一个返回 9.Y)。

在里面configure,在第 30659 行附近有一个这样的片段:

# We use pkg-config to look for freetype2, but fall back to
# freetype-config if it fails.  We prefer pkg-config, since we can
# then just put freetype2 >= $FREETYPE_MIN_VERSION in
# Requires.private, but at least up to 2003-06-07, there was no
# freetype2.pc in the release.
#
# FreeType versions come in three forms:
#   release (such as 2.1.9)
#   libtool (such as 9.7.3) (returned by freetype-config and pkg-config)
#   platform-specific/soname (such as 6.3.4)
# and they recommend you never use the platform-specific version
# (see docs/VERSION.DLL in freetype2 sources)
#
# Set these as appropriate:

# release number - for information only
FREETYPE_MIN_RELEASE=2.1.9
# libtool-specific version - this is what is checked
FREETYPE_MIN_VERSION=9.7.3

就我而言,pkg-config 使用的是 2.X 版本。将 的值FREETYPE_MIN_VERSION更改为 的值FREETYPE_MIN_RELEASE解决了问题。

于 2019-12-02T19:59:59.530 回答