How to set environment variable for MCR in Ubuntu
I am new to ubuntu. I am using matlab in ubuntu. I used 'mcc' command in matlab(ubuntu) to create executable files.
Now to run those executables I need to set the 'MCR' directory path to the environment variable. I used 'setenv' but, it says 'setenv is not found. the following is what I did-
setenv PATH/<mcr root path>/v7.17: "$PATH"
And I get the following output-
No command 'setenv' found, did you mean command 'neten'
from package 'netenv'
setenv: commmand not found
Can you please help me telling how do I set the environment variable in ubuntu to run my executable files.
matlab
add a comment |
I am new to ubuntu. I am using matlab in ubuntu. I used 'mcc' command in matlab(ubuntu) to create executable files.
Now to run those executables I need to set the 'MCR' directory path to the environment variable. I used 'setenv' but, it says 'setenv is not found. the following is what I did-
setenv PATH/<mcr root path>/v7.17: "$PATH"
And I get the following output-
No command 'setenv' found, did you mean command 'neten'
from package 'netenv'
setenv: commmand not found
Can you please help me telling how do I set the environment variable in ubuntu to run my executable files.
matlab
Cross-post: stackoverflow.com/questions/18731671/…
– ændrük
Sep 11 '13 at 5:12
yes I asked in stackoverflow fast, but somebody suggested to ask me here.
– MMH
Sep 11 '13 at 5:15
add a comment |
I am new to ubuntu. I am using matlab in ubuntu. I used 'mcc' command in matlab(ubuntu) to create executable files.
Now to run those executables I need to set the 'MCR' directory path to the environment variable. I used 'setenv' but, it says 'setenv is not found. the following is what I did-
setenv PATH/<mcr root path>/v7.17: "$PATH"
And I get the following output-
No command 'setenv' found, did you mean command 'neten'
from package 'netenv'
setenv: commmand not found
Can you please help me telling how do I set the environment variable in ubuntu to run my executable files.
matlab
I am new to ubuntu. I am using matlab in ubuntu. I used 'mcc' command in matlab(ubuntu) to create executable files.
Now to run those executables I need to set the 'MCR' directory path to the environment variable. I used 'setenv' but, it says 'setenv is not found. the following is what I did-
setenv PATH/<mcr root path>/v7.17: "$PATH"
And I get the following output-
No command 'setenv' found, did you mean command 'neten'
from package 'netenv'
setenv: commmand not found
Can you please help me telling how do I set the environment variable in ubuntu to run my executable files.
matlab
matlab
edited Sep 11 '13 at 6:12
January
25.5k106788
25.5k106788
asked Sep 11 '13 at 4:54
MMHMMH
10111
10111
Cross-post: stackoverflow.com/questions/18731671/…
– ændrük
Sep 11 '13 at 5:12
yes I asked in stackoverflow fast, but somebody suggested to ask me here.
– MMH
Sep 11 '13 at 5:15
add a comment |
Cross-post: stackoverflow.com/questions/18731671/…
– ændrük
Sep 11 '13 at 5:12
yes I asked in stackoverflow fast, but somebody suggested to ask me here.
– MMH
Sep 11 '13 at 5:15
Cross-post: stackoverflow.com/questions/18731671/…
– ændrük
Sep 11 '13 at 5:12
Cross-post: stackoverflow.com/questions/18731671/…
– ændrük
Sep 11 '13 at 5:12
yes I asked in stackoverflow fast, but somebody suggested to ask me here.
– MMH
Sep 11 '13 at 5:15
yes I asked in stackoverflow fast, but somebody suggested to ask me here.
– MMH
Sep 11 '13 at 5:15
add a comment |
1 Answer
1
active
oldest
votes
The reason is that setenv is a *csh (e.g. tcsh) built in for setting environmental variables. There are different "shells" -- that is, programs which provide you with a command line, and they have different syntax. Most Linux distributions come with a pre-installed shell called bash, in which setting environmental variables requires a different syntax.
In bash, try
export PATH=$PATH:/what/ever/path/v7.17
(export is usually unnecessary unless the PATH variable has not been set yet, which normally is not the case)
Alternatively, install tcsh (sudo apt-get install tcsh), start tcsh from the command line and enter your original command.
Update: the next error in line is that a shared library is missing. Probably you need to set up an environmental variable, $LD_LIBRARY_PATH, to point to where this library is. Find the directory where matlab keeps its shared libraries, and do
export LD_LIBRARY_PATH=/path/to/the/matlab/lib/directory/
Also, please take a look at this question (first hit when you google for "shared library libmwi18n.so is not found"): https://stackoverflow.com/questions/10972819/mcr-libmwi18n-so-file-missing
Hi I set the variable using the run_application.shell<mcr directory>, but now my machine is complaining about 'libmwi18n.so'. It says 'shared library libmwi18n.so is not found'
– MMH
Sep 11 '13 at 8:14
See the updated answer
– January
Sep 11 '13 at 8:36
Hi , thanks for your answer, even after doing it having the same error, I have asked a new question here stackoverflow.com/questions/18737143/… please help me out.
– MMH
Sep 11 '13 at 9:16
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f344101%2fhow-to-set-environment-variable-for-mcr-in-ubuntu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The reason is that setenv is a *csh (e.g. tcsh) built in for setting environmental variables. There are different "shells" -- that is, programs which provide you with a command line, and they have different syntax. Most Linux distributions come with a pre-installed shell called bash, in which setting environmental variables requires a different syntax.
In bash, try
export PATH=$PATH:/what/ever/path/v7.17
(export is usually unnecessary unless the PATH variable has not been set yet, which normally is not the case)
Alternatively, install tcsh (sudo apt-get install tcsh), start tcsh from the command line and enter your original command.
Update: the next error in line is that a shared library is missing. Probably you need to set up an environmental variable, $LD_LIBRARY_PATH, to point to where this library is. Find the directory where matlab keeps its shared libraries, and do
export LD_LIBRARY_PATH=/path/to/the/matlab/lib/directory/
Also, please take a look at this question (first hit when you google for "shared library libmwi18n.so is not found"): https://stackoverflow.com/questions/10972819/mcr-libmwi18n-so-file-missing
Hi I set the variable using the run_application.shell<mcr directory>, but now my machine is complaining about 'libmwi18n.so'. It says 'shared library libmwi18n.so is not found'
– MMH
Sep 11 '13 at 8:14
See the updated answer
– January
Sep 11 '13 at 8:36
Hi , thanks for your answer, even after doing it having the same error, I have asked a new question here stackoverflow.com/questions/18737143/… please help me out.
– MMH
Sep 11 '13 at 9:16
add a comment |
The reason is that setenv is a *csh (e.g. tcsh) built in for setting environmental variables. There are different "shells" -- that is, programs which provide you with a command line, and they have different syntax. Most Linux distributions come with a pre-installed shell called bash, in which setting environmental variables requires a different syntax.
In bash, try
export PATH=$PATH:/what/ever/path/v7.17
(export is usually unnecessary unless the PATH variable has not been set yet, which normally is not the case)
Alternatively, install tcsh (sudo apt-get install tcsh), start tcsh from the command line and enter your original command.
Update: the next error in line is that a shared library is missing. Probably you need to set up an environmental variable, $LD_LIBRARY_PATH, to point to where this library is. Find the directory where matlab keeps its shared libraries, and do
export LD_LIBRARY_PATH=/path/to/the/matlab/lib/directory/
Also, please take a look at this question (first hit when you google for "shared library libmwi18n.so is not found"): https://stackoverflow.com/questions/10972819/mcr-libmwi18n-so-file-missing
Hi I set the variable using the run_application.shell<mcr directory>, but now my machine is complaining about 'libmwi18n.so'. It says 'shared library libmwi18n.so is not found'
– MMH
Sep 11 '13 at 8:14
See the updated answer
– January
Sep 11 '13 at 8:36
Hi , thanks for your answer, even after doing it having the same error, I have asked a new question here stackoverflow.com/questions/18737143/… please help me out.
– MMH
Sep 11 '13 at 9:16
add a comment |
The reason is that setenv is a *csh (e.g. tcsh) built in for setting environmental variables. There are different "shells" -- that is, programs which provide you with a command line, and they have different syntax. Most Linux distributions come with a pre-installed shell called bash, in which setting environmental variables requires a different syntax.
In bash, try
export PATH=$PATH:/what/ever/path/v7.17
(export is usually unnecessary unless the PATH variable has not been set yet, which normally is not the case)
Alternatively, install tcsh (sudo apt-get install tcsh), start tcsh from the command line and enter your original command.
Update: the next error in line is that a shared library is missing. Probably you need to set up an environmental variable, $LD_LIBRARY_PATH, to point to where this library is. Find the directory where matlab keeps its shared libraries, and do
export LD_LIBRARY_PATH=/path/to/the/matlab/lib/directory/
Also, please take a look at this question (first hit when you google for "shared library libmwi18n.so is not found"): https://stackoverflow.com/questions/10972819/mcr-libmwi18n-so-file-missing
The reason is that setenv is a *csh (e.g. tcsh) built in for setting environmental variables. There are different "shells" -- that is, programs which provide you with a command line, and they have different syntax. Most Linux distributions come with a pre-installed shell called bash, in which setting environmental variables requires a different syntax.
In bash, try
export PATH=$PATH:/what/ever/path/v7.17
(export is usually unnecessary unless the PATH variable has not been set yet, which normally is not the case)
Alternatively, install tcsh (sudo apt-get install tcsh), start tcsh from the command line and enter your original command.
Update: the next error in line is that a shared library is missing. Probably you need to set up an environmental variable, $LD_LIBRARY_PATH, to point to where this library is. Find the directory where matlab keeps its shared libraries, and do
export LD_LIBRARY_PATH=/path/to/the/matlab/lib/directory/
Also, please take a look at this question (first hit when you google for "shared library libmwi18n.so is not found"): https://stackoverflow.com/questions/10972819/mcr-libmwi18n-so-file-missing
edited May 23 '17 at 12:39
Community♦
1
1
answered Sep 11 '13 at 6:10
JanuaryJanuary
25.5k106788
25.5k106788
Hi I set the variable using the run_application.shell<mcr directory>, but now my machine is complaining about 'libmwi18n.so'. It says 'shared library libmwi18n.so is not found'
– MMH
Sep 11 '13 at 8:14
See the updated answer
– January
Sep 11 '13 at 8:36
Hi , thanks for your answer, even after doing it having the same error, I have asked a new question here stackoverflow.com/questions/18737143/… please help me out.
– MMH
Sep 11 '13 at 9:16
add a comment |
Hi I set the variable using the run_application.shell<mcr directory>, but now my machine is complaining about 'libmwi18n.so'. It says 'shared library libmwi18n.so is not found'
– MMH
Sep 11 '13 at 8:14
See the updated answer
– January
Sep 11 '13 at 8:36
Hi , thanks for your answer, even after doing it having the same error, I have asked a new question here stackoverflow.com/questions/18737143/… please help me out.
– MMH
Sep 11 '13 at 9:16
Hi I set the variable using the run_application.shell<mcr directory>, but now my machine is complaining about 'libmwi18n.so'. It says 'shared library libmwi18n.so is not found'
– MMH
Sep 11 '13 at 8:14
Hi I set the variable using the run_application.shell<mcr directory>, but now my machine is complaining about 'libmwi18n.so'. It says 'shared library libmwi18n.so is not found'
– MMH
Sep 11 '13 at 8:14
See the updated answer
– January
Sep 11 '13 at 8:36
See the updated answer
– January
Sep 11 '13 at 8:36
Hi , thanks for your answer, even after doing it having the same error, I have asked a new question here stackoverflow.com/questions/18737143/… please help me out.
– MMH
Sep 11 '13 at 9:16
Hi , thanks for your answer, even after doing it having the same error, I have asked a new question here stackoverflow.com/questions/18737143/… please help me out.
– MMH
Sep 11 '13 at 9:16
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f344101%2fhow-to-set-environment-variable-for-mcr-in-ubuntu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Cross-post: stackoverflow.com/questions/18731671/…
– ændrük
Sep 11 '13 at 5:12
yes I asked in stackoverflow fast, but somebody suggested to ask me here.
– MMH
Sep 11 '13 at 5:15