在Mac OSX上安装flite时出错 [英] Error installing flite on Mac OSX

查看:150
本文介绍了在Mac OSX上安装flite时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载了最新的flite来源分发版本,并按照常规流程进行了操作安装它.

I have downloaded the latest source distribution of flite, and went about the usual process of installing it.

$ ./configure
$ make
$ sudo make install

但是,当我尝试将库安装到系统中时,遇到一个奇怪的错误.

However, I run into a strange error when I try to install the library to my system.

$ sudo make install
Installing
mkdir -p /usr/local/bin
mkdir -p /usr/local/lib
mkdir -p /usr/local/include/flite
/usr/bin/install -c -m 644 include/*.h /usr/local/include/flite
/usr/bin/install -c -m 755 ../bin/flite_time /usr/local/bin
cp -pd ../build/i386-darwin13.1.0/lib/libflite_cmu_us_kal.a ../build/i386-darwin13.1.0/lib/libflite_cmu_time_awb.a ../build/i386-darwin13.1.0/lib/libflite_cmu_us_kal16.a ../build/i386-darwin13.1.0/lib/libflite_cmu_us_awb.a ../build/i386-darwin13.1.0/lib/libflite_cmu_us_rms.a ../build/i386-darwin13.1.0/lib/libflite_cmu_us_slt.a ../build/i386-darwin13.1.0/lib/libflite_usenglish.a ../build/i386-darwin13.1.0/lib/libflite_cmulex.a ../build/i386-darwin13.1.0/lib/libflite.a /usr/local/lib
cp: illegal option -- d
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
make[1]: *** [install] Error 64
make: *** [install] Error 2

我该如何解决?

推荐答案

Mac使用的BSD cp与大多数Linux发行版的GNU cp之间存在一些细微的差异.

There a few subtle differences between the BSD cp that Mac uses and the GNU cp of most linux distributions.

在Linux机器上考虑以下man cp片段:

Consider the following snippet of man cp from a linux box:

   -d     same as --no-dereference --preserve=links

   -P, --no-dereference
          never follow symbolic links in SOURCE

   --preserve[=ATTR_LIST]
          preserve  the  specified  attributes (default: mode,ownership,timestamps), if possible additional attributes: context,
          links, xattr, all

因此,基本上,它试图做的是复制以下路径,如果它们是链接,则仅复制链接,而不是底层文件."

So basically what it's trying to do is "copy the following paths, and if they're links, just copy the link, not the underlying file."

p选项在Mac下存在,等效于linux行为.但是,没有d选项.

The p option exists under Mac and is equivalent to the linux behavior. The d option, however, is absent.

我试图找到一种方法来模仿Mac cp上的复制链接,而不是目标"的行为,据我所知,没有令人愉快的方法.

I've tried to figure out a way to mimic the behavior of "copy links, not targets" with the Mac cp, and as far as I can tell, there's no pleasant way to do it.

幸运的是,这里的工作很艰巨.在Mac上的man cp中:

There is, fortunately, a gross work around. From man cp under Mac:

除非设置-R标志,否则始终遵循符号链接,在这种情况下,默认情况下不遵循符号链接.

Symbolic links are always followed unless the -R flag is set, in which case symbolic links are not followed, by default.

换句话说,由于我们知道我们只是在复制文件,因此您可以简单地将d标志替换为R标志.行为在技术上有所不同(非常有所不同),但在此特定情况下无关紧要.您需要找到Makefile中使用的cp标志(希望在文件顶部的CP变量中)并只需对其进行更改.

In other words, since we know we're only copying files, you can simply replace the d flag with the R flag. The behavior is technically different (very different), but it won't matter in this specific case. You'll need to find the cp flags used in the Makefile (hopefully in a CP variable at the top of the file) and simply change them.

如果确定cp是Makefile中要执行的最后一件事,则还可以复制并粘贴它,而不用更改Makefile.

If you're sure the cp is the last thing to be executed in the Makefile, you could also just copy and paste it instead of changing the Makefile.

这篇关于在Mac OSX上安装flite时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆