Linux 安装故障排除
本节提供在 Linux 安装过程中可能出现的问题的解决方案。每个问题都有一个讨论部分,说明正在发生的情况;还有一个解决方案部分,说明如何解决该问题。如果你的问题未在此处描述,请联系技术支持(Technical Support)。
问题
尝试运行使用 Riverbed Modeler 库的程序时,出现"No such file or directory"错误。
讨论
PATH 环境变量必须设置为包含正确的 Riverbed Modeler 可执行文件目录。要么该变量不包含可执行文件目录,要么它被设置为了早期版本的目录。
解决方案
确保每个用户都具有正确的环境路径,方法如下:
步骤 1:检查环境路径(Checking the Environment Path)
-
登录到用户的账户。
-
打开用户的 Shell 启动文件(C Shell 中为
.cshrc)。 -
将以下目录添加到用户的 PATH 变量中。
<install_dir>/<release>/sys/unix/bin
过程 1 结束
问题
你不知道服务器工作站上是否已安装并配置了 ANSI C 编译器。缺少编译器会导致编译模型和运行仿真时出现错误。
讨论
仿真和模型构建需要 ANSI C 编译器。你可能需要更新系统范围的环境变量,以包含存放编译器的目录。
解决方案
要确定你的 C 编译器是否符合 ANSI 标准,请输入并编译以下程序。如果编译器配置正确,运行该程序时将看到如下消息:
The compiler used to compile this code supports ANSI.
如果程序失败,你必须将 Riverbed Modeler 指向一个使用符合 ANSI 标准的编译器的脚本。安装编译器后,必须将每个用户的首选项文件中 comp_prog 或 comp_prog_cpp 首选项的值更改为该脚本的名称。如果你需要更多帮助,请联系技术支持。
/* test_for_ansi.c */
/* */
/* prompt% cc test_for_ansi.c */
/* */
/* This typically creates an executable program named */
/* a.out. Many compilers also support a '-o' */
/* operation that can be used as shown below to re- */
/* name this executable program: */
/* */
/* prompt% cc test_for_ansi.c -o test_for_ansi */
#include <stdio.h>
int main ()
{
#ifdef __STDC__
printf ("The compiler used to compile this code
supports ANSI\n");
#else
printf ("The compiler used to compile this code
is non-ANSI\n");
printf ("An ANSI compliant compiler is required
for use with Riverbed Modeler\n");
#endif
如果需要安装编译器,请确保它满足系统要求。