如何在生产环境中安装 taglib-ruby

Posted

技术标签:

【中文标题】如何在生产环境中安装 taglib-ruby【英文标题】:How to install taglib-ruby on production 【发布时间】:2014-12-02 11:55:47 【问题描述】:

我想在我的生产系统上安装 taglib-ruby。我尝试了以下步骤:

git clone git@github.com:taglib/taglib.git
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release 
make
sudo make install

当我运行make 步骤时,我收到以下错误:

[manoj@appr-taglib-master]$ make
Scanning dependencies of target tag
[  0%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/mpegfile.cpp.o
[  1%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/mpegproperties.cpp.o
[  2%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/mpegheader.cpp.o
[  3%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/xingheader.cpp.o
[  4%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v1/id3v1tag.cpp.o
[  5%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v1/id3v1genres.cpp.o
[  6%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/id3v2framefactory.cpp.o
[  7%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/id3v2synchdata.cpp.o
[  8%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/id3v2tag.cpp.o
[  9%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/id3v2header.cpp.o
[ 10%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/id3v2frame.cpp.o
[ 11%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/id3v2footer.cpp.o
[ 12%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/id3v2extendedheader.cpp.o
[ 13%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/attachedpictureframe.cpp.o
[ 14%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/commentsframe.cpp.o
[ 15%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/eventtimingcodesframe.cpp.o
[ 16%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/generalencapsulatedobjectframe.cpp.o
[ 17%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/ownershipframe.cpp.o
[ 18%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/popularimeterframe.cpp.o
[ 19%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/privateframe.cpp.o
[ 20%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/relativevolumeframe.cpp.o
[ 21%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/synchronizedlyricsframe.cpp.o
[ 22%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/textidentificationframe.cpp.o
[ 23%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/uniquefileidentifierframe.cpp.o
[ 24%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/unknownframe.cpp.o
[ 25%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/unsynchronizedlyricsframe.cpp.o
[ 26%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/urllinkframe.cpp.o
[ 27%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/chapterframe.cpp.o
/home/appuser/taglib-master/taglib/mpeg/id3v2/frames/chapterframe.cpp:92: error: reference to ‘uint’ is ambiguous
/usr/include/sys/types.h:153: error: candidates are: typedef unsigned int uint
/home/appuser/taglib-master/taglib/toolkit/taglib.h:66: error:                 typedef unsigned int TagLib::uint
/home/appuser/taglib-master/taglib/mpeg/id3v2/frames/chapterframe.cpp:92: error: reference to ‘uint’ is ambiguous
/usr/include/sys/types.h:153: error: candidates are: typedef unsigned int uint
/home/appuser/taglib-master/taglib/toolkit/taglib.h:66: error:                 typedef unsigned int TagLib::uint
/home/appuser/taglib-master/taglib/mpeg/id3v2/frames/chapterframe.cpp:92: error: ‘uint’ does not name a type
/home/appuser/taglib-master/taglib/mpeg/id3v2/frames/chapterframe.cpp:97: error: reference to ‘uint’ is ambiguous
/usr/include/sys/types.h:153: error: candidates are: typedef unsigned int uint
/home/appuser/taglib-master/taglib/toolkit/taglib.h:66: error:                 typedef unsigned int TagLib::uint
/home/appuser/taglib-master/taglib/mpeg/id3v2/frames/chapterframe.cpp:97: error: reference to ‘uint’ is ambiguous
/usr/include/sys/types.h:153: error: candidates are: typedef unsigned int uint
/home/appuser/taglib-master/taglib/toolkit/taglib.h:66: error:                 typedef unsigned int TagLib::uint
/home/appuser/taglib-master/taglib/mpeg/id3v2/frames/chapterframe.cpp:97: error: ‘uint’ does not name a type
/home/appuser/taglib-master/taglib/mpeg/id3v2/frames/chapterframe.cpp:102: error: reference to ‘uint’ is ambiguous
/usr/include/sys/types.h:153: error: candidates are: typedef unsigned int uint
/home/appuser/taglib-master/taglib/toolkit/taglib.h:66: error:                 typedef unsigned int TagLib::uint
/home/appuser/taglib-master/taglib/mpeg/id3v2/frames/chapterframe.cpp:102: error: reference to ‘uint’ is ambiguous
/usr/include/sys/types.h:153: error: candidates are: typedef unsigned int uint
/home/appuser/taglib-master/taglib/toolkit/taglib.h:66: error:                 typedef unsigned int TagLib::uint
/home/appuser/taglib-master/taglib/mpeg/id3v2/frames/chapterframe.cpp:102: error: ‘uint’ does not name a type
/home/appuser/taglib-master/taglib/mpeg/id3v2/frames/chapterframe.cpp:107: error: reference to ‘uint’ is ambiguous
/usr/include/sys/types.h:153: error: candidates are: typedef unsigned int uint
/home/appuser/taglib-master/taglib/toolkit/taglib.h:66: error:                 typedef unsigned int TagLib::uint
/home/appuser/taglib-master/taglib/mpeg/id3v2/frames/chapterframe.cpp:107: error: reference to ‘uint’ is ambiguous
/usr/include/sys/types.h:153: error: candidates are: typedef unsigned int uint
/home/appuser/taglib-master/taglib/toolkit/taglib.h:66: error:                 typedef unsigned int TagLib::uint
/home/appuser/taglib-master/taglib/mpeg/id3v2/frames/chapterframe.cpp:107: error: ‘uint’ does not name a type
make[2]: *** [taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/chapterframe.cpp.o] Error 1
make[1]: *** [taglib/CMakeFiles/tag.dir/all] Error 2
make: *** [all] Error 2

gcc --version

gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

【问题讨论】:

您是否尝试过构建 taglib 的发布标签是否有效?克隆后尝试git checkout v1.7.2 你需要将你的 gcc 更新到最新版本,你是什么 linux 发行版? @PeterShoukry 用 gcc 版本更新了我的问题。 @Mano 我假设是 Debian/Ubuntu @robinst 我尝试使用 v1.7.2 版本,它现在可以工作了。谢谢。 【参考方案1】:

如果你跑了

dpkg -L libc6-dev | grep types.h

你会发现 types.h 是 libc6-dev 包的一部分,所以你有几个选择:

    更新您的系统包 安装你的 GCC 和库的第二个版本,按照这个 answer 他有一个很好的解释。

【讨论】:

以上是关于如何在生产环境中安装 taglib-ruby的主要内容,如果未能解决你的问题,请参考以下文章

iptables 生产环境下基础设置

部署到生产环境的正确方法

OpenShift-安装部署

在生产环境中实现最佳性能的 APR

CA证书如何安装

Hanlp 在Python环境中安装介绍及使用