I am using Centos 5.x. I have set the system-config-language in /etc/sysconfig/i18n file as
LANG="en_US.UTF-8"
SYSFONT="latarcyrheb-sun16"
But when i type echo $LANG it shows as :
fr_FR.UTF_8
Please let me know where can i change the settings so that i will get English language as default.
Thanks
Rajasekhar
Try running the source command on the file:
source /etc/sysconfig/i18n
Related
system: Ubuntu 14.04
I download a GSL(GNU Scientific Library) and it is correctly installed on my computer, in directory /home/chenjiyao/GSL
Then I add a few lines at the buttom of ~/.bashrc
export PATH=$PATH:/home/chenjiyao/GSL/bin
export C_INCLUDE_PATH=$C_INCLUDE_PATH:/home/chenjiyao/GSL/include
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/chenjiyao/GSL/lib
then I just source ~/.bashrc in the terminal.
But it seems not working because when I include<gsl/gsl_math.h> in the source file, I was told that the head file is not found, which means the path for gcc is not settled correctly.
What's wrong with it ?
Thank you.
I am trying to check my installation of hadoop. I did create the environment variables and when I call printenv, I do see my HADOOP_HOME and PATH variables printed and correct (home/hadoop and HADOOP_HOME/bin respectively).
If I go to home/hadoop in the terminal and call ls, I see the hadoop file there. If I try to run it by calling hadoop, it still tells me command not found.
First day on Linux, so there may be a stupid answer to this problem.
Your current working directory is probably not part of your path.
That is default on linux systems.
If you are in the same directory, where your hadoop file is, run that command with an relative path, like: ./hadoop
HOME DIRECTORY:
/home/hadoop is a home directory created by linux similar to Document and settings in windows.
Open your terminal and type:
ls -l /home/hadoop
Post your result for this command: ls -l /home/hadoop
SETTING GLOBAL PATH:
Go to /home/hadoop and open .bashrc in text editor.
Add these lines at the end:
export HADOOP_HOME=/path/to/your/hadoop/installation/folder
export PATH=$PATH:$HADOOP_HOME/bin
Save and exit. Now type, this in your teminal:
echo $PATH
echo $HADOOP_HOME
If these commands shows correct directories, try hadoop command. It should work.
Post your result for these command: echo $PATH and echo $HADOOP_HOME
Go to Hadoop-x.x.x/bin folder
check for hadoop folder there
run ./hadoop version
You must run “hadoop version” command.
If the hadoop setup is fine, then you should see the following result:
Hadoop 2.4.1
Subversion https://svn.apache.org/repos/asf/hadoop/common -r 1529768
Compiled by hortonmu on 2013-10-07T06:28Z
Compiled with protoc 2.5.0
From source with checksum 79e53ce7994d1628b240f09af91e1af4
For installation related guide you can refer here:
Hadoop Environment Setup
Link to my quora answer https://qr.ae/TWngHN
Hope this helps.
Thanks
Enter which hadoop in your terminal. If you see a path as an output, hadoop is set in PATH of your system. If you get something similar to this,
usr/bin/which: no hadoop in (/usr/local/hadoop.... you might not have setup everything properly. Modify the /etc/bash.bashrc with
export HADOOP_HOME = /path/to/hadoop/folder and add it to PATH using export PATH=$PATH:HADOOP_HOME/bin
You may be editing the wrong ~/.bashrc file.
Open terminal and run sudo gedit ~/.bashrc and edit these command
export HADOOP_HOME=/usr/local/hadoop
export PATH=$PATH:$HADOOP_HOME/bin
export PATH=$PATH:$HADOOP_HOME/sbin
Note: You must not use sudo gedit ~/.bashrc.sh these both work differently on newer OS
I'm running IntelliJ Idea under linux. I have created a project and a module inside it, and in that module I have a class (MyClass.class) and when I'm trying to run it from IDE, I get
ERROR: MyClass.class (No Such file or directory)
Can somebody explain me why IntelliJ Idea doesn't recognize the classes inside my module? I know it should be a problem regarding module settings but I can't figure it out. I'm using Ubuntu 11.10
OK I place here the paths and everything for all to see :)
type : echo $PATH
Result:
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/java-7-openjdk-i386/bin:/usr/lib/jvm/java-7-openjdk-i386/bin:/usr/lib/jvm/java-7-openjdk-i386/bin
type: echo $JAVA_HOME
Result:
/usr/lib/jvm/java-7-openjdk-i386
type: ./idea.sh
Result:
NOTE: If you have both Sun JDK and OpenJDK installed
please validate either IDEA_JDK or JDK_HOME environment variable points to valid Sun JDK installation
Arkde, I have a possible explanation why Jaroslav's solution with JDK7 didn't work for you.
Maybe you had mixed Java versions in various alternatives items, possibly conflicting with the version that environment variables like JAVA_HOME and JDK_HOME point to?
Maybe something points to the /usr/lib/jvm/default-java symlink as the JDK home, and that symlink points to a different version of JDK than intended?
Did you try resetting alternatives for all Java tools to version 7? Like this:
update-java-alternatives --list
# ...see what JDK's are available, choose the one that corresponds to Java 7
# and set it to be the default in alternatives:
sudo update-java-alternatives --set java-1.7.0-openjdk-amd64
# or interactively:
sudo update-alternatives --config java
What do the following commands output on your system?
echo $JAVA_HOME
echo $JDK_HOME
ls -l /usr/lib/jvm/default-java
update-java-alternatives --list
update-alternatives --list java
I had exactly the same problem.
I've performed strace on the Idea process and in the log I saw it trying to open several .class files without the path to them specified - like open("SomeClass.class", O_RDONLY) = -1 ENOENT (No such file or directory) - no path to the project output directory and to appropriate package.
So I've apt-get installed JDK 7 along JDK 6:
apt-get install openjdk-7-doc openjdk-7-jdk openjdk-7-jre openjdk-7-jre-headless openjdk-7-jre-lib openjdk-7-source
In Ubuntu 11.10 Oneiric, OpenJDK 6 isn't removable if you want OpenJDK 7. JDK 7 is dependent on JDK 6...
So I've:
updated alternatives configuration as specified above,
changed the /usr/lib/jvm/default-java symlink to point to java-7-openjdk-amd64 ,
double checked all the environment variables (my JAVA_HOME and JDK_HOME both point to /usr/lib/jvm/default-java),
reconfigured my project's SDK appropriately (and for all the modules in the project),
and voila - problem solved!
Solved it. Remove all jdk/jre you have, install openjdk7.
Add this line to .bashrc
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386/
export PATH=$PATH:$JAVA_HOME/bin
Run Idea. Profit. :)
I experienced the same problem. What I found is that the underlying system-wide Java version doesn't matter, so there is no need to set JAVA_HOME or update_alternatives. All I had to do was change some settings in IDEA:
Add a Java SDK, either OpenJDK 7, or Oracle JDK 6 or 7 (File -> Project structure -> SDKs)
Select it as Project SDK (File -> Project structure -> Project)
Check that Make checkbox is enabled, otherwise IDEA will not compile your project, also verify that class file is available in the output directory and you are running with the classpath of the correct module.
If the problem remains, send a sample project to support.
I've run into the same problem - I moved my projects (and Idea settings) from a laptop with Ubuntu 10.04 and sun-jdk-6 to a PC with Ubunty 11.10 and openjdk-6. Upon project rebuild I got MyClass.class (No Such file or directory) errors for ALL classes.
Thanks to Jaroslav, his (almost) solution did helped - I can't explain why, perhaps it would work with sun-jdk-6 too... So, I installed openjdk-7, without removing openjdk-6, and set 7th as a project's JDK in Idea. (I did not change anything in environment variables.) With jdk7 it compiled.
PS I should've written it as a comment to Jaroslav's post, not a separate answer, but I don't yet have enough reputation to do this...
Try to run IDEA using
sh -c "export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386 && ./idea.sh"
When it starts press Ctrl+Alt+Shift+S to open Project Settings dialog. In the left panel choose Project and verify that Project SDK is configured correctly (at least it is not red).
I followed the official documentation guide on how to install Gitolite to create my own repository on a brand new CentOS server.
When I get to the part where I must put the following command:
gl-setup myPublicKey.pub
I get a command not found warning on terminal.
Somehow I need to put an alias or symbolic link to the $HOME/bin/gl-setup, but I don't know how to do that.
Does anybody know how to help me?
Thanks!
You can probably just add "$HOME/bin" to your PATH.
Edit your $HOME/.bash_profile and append the line:
PATH=$PATH:$HOME/bin ; export PATH
to the end of it (I'm guessing that you're using the default bash shell). Source the file (or logout-login) and you should be good to go.
Use the gl-easy-setup from the client side.
I installed jdk1.6.0_16 on enterprise linux 4 and I also set teh JAVA_HOME in my ~/.bash_profile
echo $JAVA_HOME correctly shows the new path of the java file
export JAVA_HOME=/jdk16/jdk1.6.0_16/bin/java
The bin directory is also int he path
However when I do java -version I still see java version "1.4.2"
How do I see newly installed jdk verion when i issue java -version command
whereis java
Type that in, and it will show you the locations java is kept.
Here is a page about it
Or execute the java binary directly using: /jdk16/jdk1.6.0_16/bin/java -version
In addition to what PostMan said, you should also modify your PATH envvar in the following way:
export PATH=$JAVA_HOME:$PATH
put this in your bash_profile. This will guarantee you pick up the 1.60 jdk. Also your JAVA_HOME should probably be;
JAVA_HOME=/jdk16/jdk1.6.0_16/bin
that is you shouldn't put the path to the actual java executable in JAVA_HOME. It should point to the java installs bin directory.
Executing
which java
will tell you which jvm's executable you're running when you just run java -version.
With multiple JVMs installed, it's best to fully specify the path or set your PATH environment variable appropriately.
$ vi ~/.bash_profile
--> Add
export JAVA_HOME=<path to java jdk>
export PATH=$JAVA_HOME:$PATH
--> write/save
Esc + : + w
--> quit editor
Esc + : + q