我想安装 eclipse-cdt 进行 c++ 开发。但它似乎无法在 ubuntu 中单独安装。如果不能单独安装,为什么会有单独的包?
[balakrishnan@mylap ~]$ sudo apt-get install eclipse-cdt 正在读取软件包列表...完成 正在构建依赖关系树 正在读取状态信息...完成 将安装以下额外软件包:
ant ant-optional aspectsj binfmt-support ca-certificates-java default-jdk default-jre default-jre-headless eclipse-cdt-jni eclipse-emf eclipse-jdt*eclipse-pde* eclipse-平台 eclipse-平台数据发表于 2018-07-27 16:26:27fastjar icedtea-7-jre-jamvm jarwrapper java-common junit junit4 libapache-pom-java libasm3-java libaspectj-java libatk-wrapper-java libatk-wrapper-java-jni libbonobo2-0 libbonobo2-common
libbonoboui2-0 libbonoboui2-common libcommons-beanutils-java libcommons-cli-java libcommons-codec-java libcommons-collections3-java libcommons-compress-java libcommons-dbcp-java libcommons-digester-java libcommons-httpclient-java libcommons-lang-java
libcommons-logging-java libcommons-parent-java libcommons-pool-java libdb-java libdb-je-java libdb5.1-java libdb5.1-java-jni
libeasymock-java libecj-java libequinox-osgi-java libfelix-bundlerepository-java libfelix-gogo-command-java libfelix-gogo-runtime-java libfelix-gogo-shell-java libfelix-osgi-obr-java libfelix-shell-java libfelix-utils-java libgconf2-4 libgeronimo-jpa-2.0-spec-java
libgeronimo-jta-1.1-spec-java libgeronimo-osgi-support-java libgif4 libgnome2-0 libgnome2-bin libgnome2-common libgnomecanvas2-0
libgnomecanvas2-common libgnomeui-0 libgnomeui-common libgnomevfs2-0 libgnomevfs2-common libhamcrest-java libice-dev libicu4j-4.4-java
libicu4j-java libidl-common libidl0 libjetty8-java libjline-java libjsch-java libjtidy-java libkxml2-java liblucene2-java liborbit2
libosgi-compendium-java libosgi-core-java libosgi-foundation-ee-java libpthread-stubs0 libpthread-stubs0-dev libregexp-java
libservlet2.5-java libservlet3.0-java libsm-dev libswt-cairo-gtk-3-jni libswt-glx-gtk-3-jni libswt-gnome-gtk-3-jni libswt-gtk-3-java
libswt-gtk-3-jni libswt-webkit-gtk-3-jni libtomcat7-java libx11-dev libx11-doc libxau-dev libxcb1-dev libxdmcp-dev libxerces2-java
libxml-commons-external-java libxml-commons-resolver1.1-java libxt-dev libxz-java openjdk-7-jdk openjdk-7-jre openjdk-7-jre-headless
openjdk-7-jre-lib sat4j ttf-dejavu-extra tzdata-java x11proto-core-dev x11proto-input-dev x11proto-kb-dev xorg-sgml-doctools xtrans-dev 建议的软件包:ant-gcj ant-doc libbsf-java liboro-java libxalan2-java libjaxp1.3-java liblog4j1.2-java jython antlr libbcel-java libjdepend-java libgnumail-java libcommons-net-java javacc ant-optional-gcj eclipse equivs junit-doc libbonobo2-bin libcommons-beanutils-java-doc libcommons-collections3-java-doc libcommons-dbcp-java-doc libcommons-digester-java-doc libcommons-httpclient-java-doc libavalon-framework-java libcommons-logging-java-doc libexcalibur-logkit-java libdb5.1-java-gcj libeasymock-java-doc ecj libecj-java-gcj
libfelix-bundlerepository-java-doc libfelix-gogo-command-java-doc libfelix-gogo-runtime-java-doc libfelix-gogo-shell-java-doc
libfelix-osgi-obr-java-doc libfelix-shell-java-doc libfelix-utils-java-doc libgeronimo-jpa-2.0-spec-java-doc libgeronimo-jta-java-doc libgeronimo-osgi-support-java-doc 桌面基础 libgnomevfs2-bin libgnomevfs2-extra gamin fam gnome-mime-data libice-doc jetty8 libjetty8-java-doc libjline-java-doc libjtidy-java-doc libosgi-compendium-java-doc libosgi-core-java-doc libosgi-foundation-ee-java-doc libsm-doc libswt-gtk-3-java-gcj tomcat7 libxcb-doc libxerces2-java-doc libxerces2-java-gcj libxml-commons-resolver1.1-java-doc libxt-doc
openjdk-7-demo openjdk-7-source visualvm icedtea-7-plugin sun-java6-fonts fonts-ipafont-gothic fonts-ipafont-mincho ttf-telugu-fonts ttf-oriya-fonts ttf-kannada-fonts ttf-bengali-fonts 将安装以下新软件包: ant ant-optional aspectsj binfmt-support ca-certificates-java default-jdk default-jre default-jre-headless eclipse-cdt eclipse-cdt-jni eclipse-emf eclipse-jdt eclipse-pde eclipse-platform eclipse-platform-data eclipse-rcp eclipse-rse fastjar icedtea-7-jre-jamvm jarwrapper
java-common junit junit4 libapache-pom-java libasm3-java libaspectj-java libatk-wrapper-java libatk-wrapper-java-jni libbonobo2-0 libbonobo2-common libbonoboui2-0 libbonoboui2-common libcommons-beanutils-java libcommons-cli-java libcommons-codec-java
libcommons-collections3-java libcommons-compress-java libcommons-dbcp-java libcommons-digester-java libcommons-httpclient-java libcommons-lang-java libcommons-logging-java libcommons-parent-java libcommons-pool-java libdb-java libdb-je-java libdb5.1-java libdb5.1-java-jni libeasymock-java libecj-java libequinox-osgi-java libfelix-bundlerepository-java libfelix-gogo-command-java
libfelix-gogo-runtime-java libfelix-gogo-shell-java libfelix-osgi-obr-java libfelix-shell-java libfelix-utils-java libgconf2-4 libgeronimo-jpa-2.0-spec-java libgeronimo-jta-1.1-spec-java libgeronimo-osgi-support-java libgif4 libgnome2-0 libgnome2-bin libgnome2-common libgnomecanvas2-0 libgnomecanvas2-common libgnomeui-0 libgnomeui-common libgnomevfs2-0 libgnomevfs2-common libhamcrest-java libice-dev libicu4j-4.4-java libicu4j-java libidl-common libidl0 libjetty8-java libjline-java libjsch-java libjtidy-java libkxml2-java liblucene2-java liborbit2 libosgi-compendium-java libosgi-core-java libosgi-foundation-ee-java libpthread-stubs0 libpthread-stubs0-dev libregexp-java
libservlet2.5-java libservlet3.0-java libsm-dev libswt-cairo-gtk-3-jni libswt-glx-gtk-3-jni libswt-gnome-gtk-3-jni libswt-gtk-3-java
libswt-gtk-3-jni libswt-webkit-gtk-3-jni libtomcat7-java libx11-dev libx11-doc libxau-dev libxcb1-dev libxdmcp-dev libxerces2-java
libxml-commons-external-java libxml-commons-resolver1.1-java libxt-dev libxz-java openjdk-7-jdk openjdk-7-jre openjdk-7-jre-headless
openjdk-7-jre-lib sat4j ttf-dejavu-extra tzdata-java x11proto-core-dev x11proto-input-dev x11proto-kb-dev xorg-sgml-doctools xtrans-dev 已升级 0 个,新安装 123 个,要删除 0 个,未升级 0 个。需要获取 311 MB 的档案。此操作后,将使用 392 MB 的额外磁盘空间。是否要继续 [Y/n]?
答案1
我建议从 eclipse.org 安装 eclipse。转到http://www.eclipse.org/downloads/并下载您喜欢的 eclipse 包。然后转到http://java.com/en/download/manual.jsp?locale=en并下载适合您操作系统的 Java 版本(i386 为“Linux”,amd64 为“Linux x64”)。将两个存档解压到一个文件夹(我通常创建 ~/bin)。您应该得到两个文件夹:eclipse 和 jre1.7.0_09。
然后编辑文件 eclipse/eclipse.ini,添加:
-vm
../jre1.7.0_09/bin/java
以下
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
这将使 eclipse 始终使用 Oracles 的 java。Eclipse 仅经过测试可在 oracle 的 java 上运行。
使用此方法,您可以进行多次 eclipse 安装,每个安装中只需要安装所需的工具。