安装错误:ftheader.h:没有这样的文件或目录

2024-02-15

当我尝试构建 matplotlib-1.3.1 时,出现以下 freetype 标头错误。可能是找不到 ftheader.h。关于如何解决这个问题有什么想法吗?

注意:我刚刚按照中提到的说明安装了 Freetype-2.5.0.1自由类型安装 http://www.linuxfromscratch.org/blfs/view/svn/general/freetype2.html因为从源代码手动构建 Matplotlib-1.3.1 由于最初未找到所需的包“freetype”而失败。

In file included from src/ft2font.h:16,
             from src/ft2font.cpp:3:
/usr/include/ft2build.h:56:38: error: freetype/config/ftheader.h: No such file or directory
In file included from src/ft2font.cpp:3:
src/ft2font.h:17:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:18:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:19:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:20:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:21:10: error: #include expects "FILENAME" or <FILENAME>
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_algobase.h:69,
             from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/char_traits.h:41,
             from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/string:42,
             from ./CXX/Python2/Exception.hxx:46,
             from ./CXX/Exception.hxx:40,
             from ./CXX/Python2/Objects.hxx:44,
             from ./CXX/Python2/Extensions.hxx:52,
             from ./CXX/Extensions.hxx:40,
             from src/ft2font.h:6,
             from src/ft2font.cpp:3:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_iterator.h:91: error: expected template-name before ‘<’ token
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_iterator.h:91: error: expected ‘{’ before ‘<’ token
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_iterator.h:91: error: expected unqualified-id before ‘<’ token
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_iterator.h:390: error: expected template-name before ‘<’ token
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_iterator.h:390: error: expected ‘{’ before ‘<’ token
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_iterator.h:390: error: expected unqualified-id before ‘<’ token
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_iterator.h:474: error: expected template-name before ‘<’ token
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_iterator.h:474: error: expected ‘{’ before ‘<’ token
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_iterator.h:474: error: expected unqualified-id before ‘<’ token

我尝试跑步sudo yum install *-devel在未安装 numpy/scipy/matplotlib 的新虚拟机上;但收到以下错误消息,我也在之前的虚拟机映像上收到了该消息。这是我正在使用的虚拟机特有的问题吗?注意:我在 Oracle VirtualBox VM 上使用 Hortonworks Sandbox v1.3

Error: metis conflicts with cmake-2.6.4-5.el6.x86_64
Error: php-pecl-apcu conflicts with php-pecl-apc-3.1.9-2.el6.x86_64
Error: cpupowerutils-devel conflicts with cpufrequtils-devel-007-6.el6.x86_64
Error: Package: libgendersplusplus-1.20-1.el6.x86_64 (HDP-epel)
       Requires: libgenders(x86-64) = 1.20-1.el6
       Installing: libgenders-1.14-2.el6.rf.x86_64 (HDP-UTILS-1.1.0.15)
           libgenders(x86-64) = 1.14-2.el6.rf
Error: zeromq3-devel conflicts with zeromq-devel-2.2.0-4.el6.x86_64
Error: Package: rubygem-passenger-devel-3.0.21-5.el6.x86_64 (HDP-epel)
       Requires: rubygem(passenger) = 3.0.21-5.el6
       Available: 1:rubygem-passenger-3.0.12-1.el6.x86_64 (HDP-UTILS-1.1.0.15)
           rubygem(passenger) = 3.0.12
Error: Package: libgenders-devel-1.20-1.el6.x86_64 (HDP-epel)
       Requires: libgenders(x86-64) = 1.20-1.el6
       Installing: libgenders-1.14-2.el6.rf.x86_64 (HDP-UTILS-1.1.0.15)
           libgenders(x86-64) = 1.14-2.el6.rf
Error: php-pecl-apcu-devel conflicts with php-pecl-apc-devel-3.1.9-2.el6.x86_64
Error: Package: libgenders-devel-1.20-1.el6.x86_64 (HDP-epel)
       Requires: libgenders(x86-64) = 1.20-1.el6
       Available: libgenders-1.14-2.el6.rf.x86_64 (HDP-UTILS-1.1.0.15)
           libgenders(x86-64) = 1.14-2.el6.rf
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

查看 /usr/share/doc 下的源代码树可以估计沙箱中预安装的软件包及其版本。注意:您可以在列表中清楚地看到 freetype-2.3.11 以及许多其他 lib 软件包,这些软件包在安装 *-dev 时可能会发生冲突

acl-2.2.49                           foomatic-db-4.0                  libedit-2.11               mpfr-2.4.1                   python-setuptools-0.6.10
acpid-1.0.10                         fping-2.4b2                      libffi-3.0.5               mx4j-3.0.1                   python-urlgrabber-3.9.1
alsa-lib-1.0.22                      freetype-2.3.11                  libfontenc-1.0.5           mysql-5.1.69                 qt3-3.3.8b
apache-tomcat-apis-0.1               fuse-2.8.3                       libgcc-4.4.7               mysql-connector-java-5.1.17  qt4
apr-1.3.9                            gamin-0.1.10                     libgcrypt-1.4.5            mysql-libs-5.1.69            qt-4.6.2
apr-util-1.3.9                       gawk-3.1.7                       libgomp-4.4.7              mysql-server-5.1.69          readline-6.0
at-3.1.10                            gcc-4.4.7                        libgpg-error-1.7           nagios-3.2.3                 redhat-logos-60.0.14
atk-1.28.0                           gd-2.0.35                        libgudev1-147              nagios-plugins-1.4.9         redhat-release
attr-2.4.44

适用于 Mac 操作系统 10.6.8

sudo ln -s /usr/X11/include/freetype2/freetype /usr/X11/include/.

似乎可以解决问题...如果您查看 /usr/X11/include/ft2build.h ,似乎确实是该头文件和自由类型安装方式的问题,而不是 matplotlib 问题。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

安装错误:ftheader.h:没有这样的文件或目录 的相关文章

  • Buildozer Numpy RuntimeError:工具链损坏:无法链接简单的 C 程序

    用 Python 编写我的第一个 Android 应用程序并使用 Buildozer 对其进行打包 因为稍后在项目中需要使用numpy 所以我尝试打包以下测试代码 import numpy import kivy kivy require
  • 如何避免在matplotlib中调用latex(输出到pgf)

    我使用 matplotlib 及其 pgf 后端来生成包含在 LaTeX 投影仪文档中的绘图 当我使用未定义的乳胶命令时 我遇到了麻烦 但对于我的应用程序 我不需要 matplotlib 来使用 Latex 生成标签或注释 我只想要正确的
  • 将索引数组转换为 NumPy 中的 one-hot 编码数组

    给定一个一维索引数组 a array 1 0 3 我想将其一次性编码为二维数组 b array 0 1 0 0 1 0 0 0 0 0 0 1 创建归零数组b有足够的列 即a max 1 然后 对于每一行i 设置a i 第 列 至1 gt
  • 将非方邻接矩阵导入 Networkx python

    我在下面有一些 pandas 数据框形式的数据 其中列代表离散技能 行代表离散工作 仅当工作需要该技能时才存在 1 否则为 0 skill 1 skill 2 job 1 1 0 job 2 0 0 job 3 1 1 我想使用 netwo
  • 如何获取所有数字列(嵌套与否)的“.describe()”统计信息?

    获取数据帧 或列表或数组 中任何列的简单描述性统计数据的最佳方法是什么 无论是否嵌套 一种高级 df describe 还包括带有数值的嵌套结构 就我而言 我有一个包含许多列的数据框 有些列的每一行都有一个数字列表 在我的例子中是时间序列结
  • 求 matplotlib 中绘制的两条曲线之间的面积(fill_ Between area)

    我有一个清单x and y两条曲线的值 两者都有奇怪的形状 而且我没有它们中任何一个的函数 我需要做两件事 绘制它并对曲线之间的区域进行着色 如下图所示 求曲线之间阴影区域的总面积 我可以绘制这些曲线之间的区域并对其进行着色fill bet
  • matplotlib 绘制什么都不显示

    我正在使用 python 的 matplotlib 使用轮廓和轮廓函数来绘制一些轮廓 使用 show 时它们都工作正常 但是当我尝试在方法内使用 draw 时 我得到了 matplotlib 窗口 但没有得到图形 show 调用将在代码中以
  • 在 Python 中倾斜数组

    我有一个 2D 数组 我将使用它保存为灰度图像scipy misc toimage 在此之前 我想将图像倾斜给定角度 像这样进行插值scipy ndimage interpolation rotate 上图只是为了说明倾斜过程 我知道我必须
  • 将数值数据更改为分类数据 - Pandas [重复]

    这个问题在这里已经有答案了 我有一个 pandas 数据框 其中有一个数字列 金额 金额从 0 到 20000 不等 我想将其更改为定义范围的分类变量 因此 分类变量将是 0 1000 之间 1000 2000 美元之间 依此类推 直到 1
  • 当图例位于轴之外时选择 matplotlib 图例

    当我修改 legend picking py 示例时 我遇到了一个有趣的怪癖 其中图例位于轴之外 如下所示 leg ax legend loc upper left fancybox True shadow True leg ax lege
  • Python:按条件绘制多个正/负条形图

    这是我第一次用 python 绘制条形图 我的 df 操作 key descript score 0 noodles taste 5 1 noodles color 2 2 noodles health 3 3 apple color 7
  • Unpivot Pandas 数据

    我目前有一个DataFrame布置为 Jan Feb Mar Apr 2001 1 12 12 19 2002 9 2003 我想将数据 逆透视 使其看起来像 Date Value Jan 2001 1 Feb 2001 1 Mar 200
  • 如何将 c_uint 的 ctypes 数组转换为 numpy 数组

    我有以下 ctypes 数组 data ctypes c uint 100 我想创建一个 numpy 数组np data包含来自 ctypes 数组数据的整数值 ctypes 数组显然稍后会填充值 我看到numpy中有一个ctypes接口
  • 有效地生成所有排列

    我需要尽快生成所有排列 https en wikipedia org wiki Permutation整数的0 1 2 n 1并得到结果作为NumPy https numpy org 形状数组 factorial n n 或者迭代此类数组的
  • Python Numpy Reshape错误[关闭]

    Closed 这个问题是无法重现或由拼写错误引起 help closed questions 目前不接受答案 我在尝试重塑 3D numpy 数组时遇到一个奇怪的错误 数组 x 的形状为 6 10 300 我想将其重塑为 6 3000 我正
  • 更新 matplotlib 中颜色条的范围

    我想更新一个contourf在函数内绘制 效果很好 然而 数据的范围发生了变化 因此我还必须更新颜色条 这就是我未能做到的地方 请参阅以下最小工作示例 import matplotlib pyplot as plt import numpy
  • 如何使用 matplotlib 显示文本

    我想这样做 我有这个Python代码 import numpy as np import pylab as plt a np array 1 2 3 4 5 6 7 8 9 10 b np array 7 8 6 3 2 1 5 8 4 1
  • 使用 matplotlib 散布条件颜色

    我有以下 Pandas Dataframe 其中 a 列代表虚拟变量 我想做的是给我的标记一个cmap jet 列值后面的颜色b 除非列中的值a等于 1 在本例中我希望它的颜色为灰色 知道我该怎么做吗 您必须标记等于 1 的值并绘制 imp
  • numpy:大量线段/点的快速规则间隔平均值

    我沿着一维线有许多 约 100 万个 不规则间隔的点 P 这些标记线段 这样 如果点是 0 x a x b x c x d 则线段从 0 gt x a x a gt x b x b gt x c x c gt x d 等 我还有每个段的 y
  • 在 scipy 中创建新的发行版

    我试图根据我拥有的一些数据创建一个分布 然后从该分布中随机抽取 这是我所拥有的 from scipy import stats import numpy def getDistribution data kernel stats gauss

随机推荐

  • 是否可以在另一个语法定义中重复使用 boost::spirit::qi 语法?

    是否可以重复使用boost spirit qi另一种语法中的语法 例如作为规则 例如 如果我定义一个语法来将文本行解析为保存街道地址的结构 template lt typename iter gt struct address gramma
  • @SpringBootApplication - ComponentScan 在新的 Eclipse 项目中无法按预期工作

    我最近开始使用 Eclipse 从 IntelliJ Idea 迁移 但无论我开始编写新的 SpringBoot 应用程序 我总是遇到这个问题 我的主类上的 SpringBootApplication 未按预期工作 我应该能够在不添加 Co
  • CORS 请求在 docker-compose 环境中失败

    我希望弄清楚为什么在 Firefox 中运行的 React 应用程序中的 API 请求失败 标头如下 Accept Accept Encoding gzip deflate Accept Language en US en q 0 5 Co
  • 为什么 Kit Kat 需要使用 isValidFragment?

    自从 KitKat 发布以来 我注意到我的一大堆应用程序都更新了 修复 Kit Kat 中的崩溃 最近 当我发布自己的应用程序时 我发现其可能的来源是使用首选项活动的新 isValidFragment 要求 然而 我无法让任何人解释为什么突
  • 如何查询 postgres 的可选参数?

    我正在设置一个REST服务和我正在使用postgres作为数据存储 我想知道如何设置postgres查询以使用可选参数 IE SELECT from users where hair color 1 and eye color 2 其中 1
  • 支持 iOS 10 的 Xcode 7.3.1

    现在我有一个基于 Xcode 7 3 1 的应用程序 运行良好 但当我想将应用程序安装到 iOS 10 设备上时 出现了一个问题 提示 找不到开发人员磁盘映像 所以我找到了一个解决方案 如下 https danielemargutti co
  • React:为什么 `this.props.children` 未定义?

    我正在用 ReactJS 构建一个电子电阻计算器 我有一个组合组件声明如下 var ResistanceCalculator React createClass getInitialState function return bands 0
  • XSL if else 条件

    我有一个要求 我想要 if else 语句来检查节点是否具有属性或仅具有字符串 例如 1 个节点有0 File s found另一个具有诸如
  • 在 Kubernetes 中找不到持久卷声明

    目前我尝试实施持续量在我的 yaml 文件中 我在互联网上阅读了很多文档 但我不明白为什么当我进入仪表板窗格时会出现此消息 未找到持久卷声明 karaf conf pod yaml apiVersion v1 kind Pod metada
  • Linux 中 SVN 存储库目录放在哪里?

    我正在 Ubuntu Linux 上设置一个新的 SVN 服务器 放置存储库的好地方 最佳实践 在哪里 我应该创建一个新用户吗 服务器将通过 http 访问 因此无需创建用户帐户等 与 svn 的情况一样 提前谢谢了 我喜欢把东西放在下面
  • Python 访问 JSON 对象中的数据

    所以我在我的脚本中这样做 import json info json loads get info print info 哪个输出 richard richard desktop projects hello python python m
  • 将 libpq.5.dylib 复制到 /usr/lib/libpq.5.dylib

    我无法在 R 中加载包 因为该文件libpq 5 dylib不在 usr lib libpq 5 dylib 它是在 usr local Cellar libpq 13 0 lib libpq 5 dylib 我尝试了这一行 sudo ln
  • iframe 的内容文档

    对于 iframe 甚至旧的 frame 元素 contentDocument 到底代表什么 它相当于 html 元素还是 body 元素 它有什么用 所有浏览器都支持此属性吗 w3 org http www w3 org TR 2003
  • 开头括号中的正则表达式

    我有一个正则表达式试图按专业划分问题 假设我有以下正则表达式 P
  • AngularJS:用户身份验证后重新加载 ng-include (或解决问题的更好方法)

    我真的只是在学习 Angular 我正在尝试创建一个基于身份验证限制内容访问的应用程序 我的身份验证部分正在工作 也使用 Laravel PHP 框架 但我在根据身份验证状态 重新加载 某些内容时遇到问题 即在身份验证成功后 最初 我想做的
  • html 中表单布局的最佳实践——表格还是流程?

    在 html 中布局表单的最佳实践是什么 特别是当您有一组带有标签的字段和可能的错误指示器时 我能做的最好的事情就是使用表格 但这在面向 CSS 的布局设计中效果不佳 例如 table tr td Name td td td tr tabl
  • Docker:“未找到 npm”

    我正在尝试容器化 ASP NET Core 和 Angular 应用程序 但遇到了一些麻烦 我收到这些错误 gt internal load build definition from Dockerfile 0 4s gt gt trans
  • AlertDialog 中的 Flutter NumberPicker 无法正常工作

    当我使用 NumberPicker 选择新值时 它总是跳回之前的值 而不是当前选择的值 我在 AlertDialog 中使用 NumberPicker 并使用 pickValue 函数调用 NumberPicker void pickVal
  • 上传并播放音频文件JS

    我有一个 HTML 音频标签和一个 HTML 文件输入标签 如下所示 我希望用户使用 上传文件 按钮从计算机中选择一首歌曲 然后使用音频标签播放它
  • 安装错误:ftheader.h:没有这样的文件或目录

    当我尝试构建 matplotlib 1 3 1 时 出现以下 freetype 标头错误 可能是找不到 ftheader h 关于如何解决这个问题有什么想法吗 注意 我刚刚按照中提到的说明安装了 Freetype 2 5 0 1自由类型安装