AMPL could not be started

When I download C++api to execute the official case in Linux environment, there is an error message as shown in the picture, which of you have encountered similar error message?

1 Like

Hi @Yuanmin,

Is that directory where you have AMPL installed? To ensure that the right AMPL executable is found, you can add the AMPL installation directory to the first position of the environment variable PATH, or set an environment as follows:

ampl::Environment env("full path to the AMPL installation directory");
ampl::AMPL ampl(env);

Thank you for your reply, I have set it up that way, but it still reports an error, is there a reference format for the installation path?

Hi @Yuanmin,

The format of the installation path is typically as follows for Linux:

ampl::Environment env("/home/username/ampl.linux-intel64/");
ampl::AMPL ampl(env);

Already done so, is there a step Iā€™m missing?

Hi @Yuanmin,

Could you please send us the output of ls -l /complete/path/to/ampl.linux-intel64? It may be some issue with file permissions.