今天想进Ubuntu的时候,发现突然没有boot选项了,出现了一个grub的什么东东,这对于Linux新手来说,太意外了,搜索了好久,依然无解,无奈,只好重装系统(事实上之前那个系统确实有些问题,这下重装正好避免,另外,估计是更新了系统导致的。重装后第一件事,就是把更新检查取消了,省得闹心。
好吧, 说说怎么安装pycharm,官方基本没什么启示
1.首先要安装JDK(这是最蛋疼的事),我就不多说了,要注意,一旦sudo -s ./jdk-6u23-linux-i586.bin时说什么“权限不够”什么的,在.bin文件属性-权限,接下来的“允许以程序执行文件“打勾!!
2.修改pycharm.sh文件,否则会提示:ERROR: cannot start PyCharm.
No JDK found to run PyCharm. Please validate either PYCHARM_JDK or JDK_HOME points to valid JDK installation
3.一旦直接sudo sh pycharm.sh会说什么找不到java什么的,比如:pycharm.sh: 118: /bin/java: not found,解决方法:在pycharm.sh开头添加这个:
JAVA_HOME=/home/bob/jdk1.6.0_27
export JRE_HOME=/home/bob/jdk1.6.0_27/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
4.然后sudo sh pycharm.sh就可以啦,但是一旦大家想图形化启动pycharm呢?也就是说懒得每次从终端里运行代码启动pycharm,只在桌面点击图标就好,那就可以这样:桌面或面板右击-添加到面板-自定义应用程序启动器-名称随便填,单击命令后面的“浏览”,找到pycharm.sh,注意:要在路径前加上sh,这个要切记!否则启动不了!
5.一切OK,享受pycharm的强大吧!
Ubuntu 安装JDK
安装前可以查看一下jdk版本,进入Ubuntu终端 $java -version 回车
1. 手动安装jdk6
首先,在https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=jdk-6u23-oth-JPR@CDS-CDS_Developer下载jdk-6u23-linux-i586.bin
然后,可以把它放置在任何你喜欢的文件夹
接下来开始安装jdk:
终端下进入你存放jdk-6u23-linux-i586.bin 到目录
$ sudo -s ./jdk-6u23-linux-i586.bin
一路回车,直到询问是否安装,输入yes回车
ok,安装完毕,接下来配置环境变量
配置classpath,修改所有用户的环境变量
$ sudo gedit /etc/profile
在文件最后添加
#set java environment
JAVA_HOME=/home/liangshihong/jdk1.6.0_23
export JRE_HOME=/home/liangshihong/jdk1.6.0_23/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
重新启动计算机,用命令测试jdk的版本
java -version
显示如下信息:成功安装
java version “1.6.0_23″
Java(TM) SE Runtime Environment (build 1.6.0_23-b04)
Java HotSpot(TM) Server VM (build 11.2-b01, mixed mode)
Linux pycharm.sh PYCHARM_JDK & JDK_HOME issue
if non PYCHARM_JDK nor JDK_HOME vairables are not set pycharm.sh will not launch and reports following error:
ERROR: cannot start PyCharm.
No JDK found to run PyCharm. Please validate either PYCHARM_JDK or JDK_HOME points to valid JDK installation
Changing following code in bin/pycharm.sh
if [ -z "$PYCHARM_JDK" ]; then
PYCHARM_JDK=$JDK_HOME
if [ -z "$PYCHARM_JDK" ]; then
echo ERROR: cannot start PyCharm.
echo No JDK found to run PyCharm. Please validate either PYCHARM_JDK or JDK_HOME points to valid JDK installation
fi
fi
to:
if [ -z "$PYCHARM_JDK" ]; then
PYCHARM_JDK=$JDK_HOME
if [ -z "$PYCHARM_JDK" ]; then
if [ -f "/usr/bin/java" ]; then
PYCHARM_JDK=/usr
else
echo ERROR: cannot start PyCharm.
echo No JDK found to run PyCharm. Please validate either PYCHARM_JDK or JDK_HOME points to valid JDK installation
fi
fi
fi
could lead to fewer installation problems, the same solution is used in PhpStorm