热门标签 | HotTags
当前位置:  开发笔记 > 运维 > 正文

probleminstallingJDKondebian

probleminstallingJDKondebian--Linux发行版技术-Debian信息,下面是详情阅读。
先下载了个jdk-6u5-linux-i586-rpm.bin

照着网上说的用root用户执行了

chmod +x jdk-6u5-linux-i586-rpm.bin //所有用户可以执行
sudo ./jdk-6u5-linux-i586-rpm.bin //执行

结果输出:

Sun Microsystems, Inc. Binary Code License Agreement
...
...
...
...
Do you agree to the above license terms? [yes or no]
yes
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: jdk-6u2-linux-i586.rpm
inflating: sun-javadb-common-10.2.2-0.1.i386.rpm
inflating: sun-javadb-core-10.2.2-0.1.i386.rpm
inflating: sun-javadb-client-10.2.2-0.1.i386.rpm
inflating: sun-javadb-demo-10.2.2-0.1.i386.rpm
inflating: sun-javadb-docs-10.2.2-0.1.i386.rpm
inflating: sun-javadb-javadoc-10.2.2-0.1.i386.rpm
error: Failed dependencies:
/bin/basename is needed by jdk-1.6.0_02-fcs.i586
/bin/cat is needed by jdk-1.6.0_02-fcs.i586
/bin/cp is needed by jdk-1.6.0_02-fcs.i586
/bin/gawk is needed by jdk-1.6.0_02-fcs.i586
/bin/grep is needed by jdk-1.6.0_02-fcs.i586
/bin/ln is needed by jdk-1.6.0_02-fcs.i586
/bin/ls is needed by jdk-1.6.0_02-fcs.i586
/bin/mkdir is needed by jdk-1.6.0_02-fcs.i586
/bin/mv is needed by jdk-1.6.0_02-fcs.i586
/bin/pwd is needed by jdk-1.6.0_02-fcs.i586
/bin/rm is needed by jdk-1.6.0_02-fcs.i586
/bin/sed is needed by jdk-1.6.0_02-fcs.i586
/bin/sort is needed by jdk-1.6.0_02-fcs.i586
/bin/touch is needed by jdk-1.6.0_02-fcs.i586
/usr/bin/cut is needed by jdk-1.6.0_02-fcs.i586
/usr/bin/dirname is needed by jdk-1.6.0_02-fcs.i586
/usr/bin/expr is needed by jdk-1.6.0_02-fcs.i586
/usr/bin/find is needed by jdk-1.6.0_02-fcs.i586
/usr/bin/tail is needed by jdk-1.6.0_02-fcs.i586
/usr/bin/tr is needed by jdk-1.6.0_02-fcs.i586
/usr/bin/wc is needed by jdk-1.6.0_02-fcs.i586
/bin/sh is needed by jdk-1.6.0_02-fcs.i586
Installing JavaDB
error: Failed dependencies:
/bin/sh is needed by sun-javadb-core-10.2.2-0.1.i386

Done.

鉴于我是个新新新手看不懂什么意思,只好从网上找了半天,结果发现原来debian和ubuntu一般用.deb安装软件,不用.rpm来安装packages。

那么就需要按照下列步骤来安装了:

1:./jdk-6u5-linux-i586-rpm.bin -x //生成好多个.rpm安装包

2:alien --scripts --keep-version -d *.rpm //把多个.rpm包转化为多个.deb包

3:dpkg -i *.deb //安装多个.deb包

4:删除你认为不重要的文件

然后看了看 /usr 下真的有一个 java目录了,该设置环境变量了:

1:vi /etc/profile //打开 /etc/profile 文件

2:在文件最后写入

JAVA_HOME=/opt/jdk-1.5.0_04

CLASSPATH=.:$JAVA_HOME/lib.tools.jar

PATH=$JAVA_HOME/bin:$PATH

export JAVA_HOME CLASSPATH PATH
推荐阅读
author-avatar
太阳神夜
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有