我正在尝试按照以下方式构建sail_align
程序这些说明。到目前为止一切顺利,我已经完成了最后的第四步,没有错误:
4) sudo ./Build install
This command will install the module.
The following perl scripts will be added to your path: sail_align, sail_align_parallel
但是,当我运行以下命令来测试安装时:
sail_align -i support/data/timit_5.wav -t support/data/timit_5.txt \
-w support/test/local -e timit_sample_test -c config/timit_alignment.cfg
Build
我收到一条消息,提示未找到 sail_align 命令。我做错了什么?以下是文件的脚本:
$progname = basename($0);
$orig_dir = Cwd::cwd();
my $base_dir = '/home/maximus/sail_align-master';
if (!magic_number_matches()) {
unless (chdir($base_dir)) {
die ("Couldn't chdir($base_dir), aborting\n");
}
unless (magic_number_matches()) {
die ("Configuration seems to be out of date, please re-run 'perl Build.PL' again.\n");
}
}
unshift @INC,
(
);
}
close(*DATA) unless eof(*DATA); # ensure no open handles to this script
use Module::Build;
Module::Build->VERSION(q{0});
# Some platforms have problems setting $^X in shebang contexts, fix it up here
$^X = Module::Build->find_perl_interpreter;
if (-e 'Build.PL' and not Module::Build->up_to_date('Build.PL', $progname)) {
warn "Warning: Build.PL has been altered. You may need to run 'perl Build.PL' again.\n";
}
# This should have just enough arguments to be able to bootstrap the rest.
my $build = Module::Build->resume (
properties => {
config_dir => '_build',
orig_dir => $orig_dir,
},
);
$build->dispatch;
编辑
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
locate sail_align
不输出任何内容
编辑2
运行find / 'sail_align'
输出以下内容
/home/maximus/perl5/bin/sail_align
/home/maximus/perl5/bin/sail_align_parallel
/home/maximus/sail_align-master
/home/maximus/sail_align-master/blib/script/sail_align
/home/maximus/sail_align-master/blib/script/sail_align_parallel
/home/maximus/sail_align-master/docs/sail_align_tutorial_vlsrp2011.pdf
/home/maximus/sail_align-master/docs/sail_align_tutorial_vlsrp2011.ppt
/home/maximus/sail_align-master/scripts/sail_align
/home/maximus/sail_align-master/scripts/sail_align_parallel
答案1
正如你所见,程序航行对齐和航行平行位于:
/home/maximus/perl5/bin
并且此路径不存在于$PATH
bash 用于解析命令位置的变量中。
您可以将路径添加到环境变量中:编辑/home/maximus/.bashrc
并在末尾添加:
PATH="$HOME/perl5/bin:$PATH"
比:
cd /home/maximus
source .bashrc
并重做你的命令