繁体   English   中英

如何在具有自由类型支持的 R (Termux) 上安装 Cairo

[英]How to install Cairo on R (Termux) with freetype support

我无法在 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安装开罗,OP 必须使用 --enable-ft=yes 重新编译开罗。 '。 我需要知道这是否解决了 R 上的安装失败以及如何在 Termux 上进行安装。

尝试这个:

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'

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

首先,cairo 的configure正在打印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 版本。 价值Chaning FREETYPE_MIN_VERSION到的值FREETYPE_MIN_RELEASE解决了这一问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM