Tag: elementaryOS

Install Oracle Java 8 in Ubuntu with Updates via PPA

Thanks to WebUpd8, you can install the most up-to-date JDK and JRE directly from Oracle, as opposed to using OpenJDK which is the default in the Ubuntu repositories. As far as I know, this should work for any *buntu OSes, including Linux Mint and elementaryOS. They should also get updates automatically via the Update Manager while they are within the support window for the OS version you’re using.

I know this isn’t exactly news, and WebUpd8 posted this information over two years ago now, but I was shocked to find out about it myself just recently, and figured I’d just go ahead and post it on my blog for anyone else who happens across it without knowing as well.

Here are the steps, all together, for adding the PPA and installing Java 8 (currently update 40). I also included an additional step to remove all remnants of the OpenJDK package. I’m uncertain if the presence of OpenJDK would cause any problems, but I figured its not needed and so worth it to clear up an easy ~50-100MB of space anyway.

sudo apt-get purge openjdk*
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default

The PPA is hosted at this location on Launchpad. As you will see if you visit the page, WebUpd8 doesn’t actually maintain any Java binary packages for on the PPA. Instead, it simply hosts the installers that pull the packages from Oracle’s own servers. An alternative might be to manually download and install the software from Oracle, but you would have to manually update it every time Oracle pushes out a new version. With this PPA, you will get updates for it automatically through the Update Manager for as long as your OS is within its support window.

If you prefer to use version 7 instead, you can issue the following commands to install the JDK and JRE packages installer for version and alternate the versions used.

sudo apt-get install oracle-java7-installer
sudo update-java-alternatives -s java-7-oracle

Then just use the following command to return to version 8, if you decide to.

sudo update-java-alternatives -s java-8-oracle

LibreOffice (Latest Version) Installation for Ubuntu, Linux Mint and elementaryOS

This is somewhat of a follow-up post to a previous post regarding updating LibreOffice for Ubuntu and Ubuntu-based OS.

Because each version of Ubuntu and any OS based on it usually pulls from a specific repository where software that has been deemed stable for that version is stored, getting the latest version of a particular software can be impossible without some configurations. Having used both Ubuntu and Linux Mint, and successfully installed and updated LibreOffice using the LibreOffice PPA, I thought the same could be done for elementaryOS, which is also based on Ubuntu (the latest version, Luna, being specifically based on Ubuntu 12.04 Precise Pangolin).

However, after installing eOS and installing LibreOffice from the default repository, I then added the LibreOffice PPA and found that it caused some issues with the Update Manager in eOS. Not only would it not allow me to update to the latest version of LibreOffice, but it even seemed to interfere with eOS being able to get other updates. I couldn’t even alter the settings in the Update Manager. After removing the LibreOffice PPA from the software sources, all problems seemed to vanish with non-LibreOffice updates. The biggest problem for me at that particular moment, however, was that I couldn’t get LibreOffice updated. A few sites mentioned compiling LibreOffice source to install the latest version, which I didn’t care to do (updating was not that big of a deal for me, if compiling the source was my only option), and so I came across someone else who mentioned following the same steps I had done before, yet adding the PPA before installing the software. So, I followed the necessary steps to completely remove LibreOffice (credit to an answer on askubuntu.com).

sudo apt-get remove --purge libreoffice*
sudo apt-get clean
sudo apt-get autoremove

And then I removed the PPA by opening Update Manager, going to Settings… at the bottom-left, going to the Software Sources tab and removing it from the list. After, I simply re-added the PPA and reinstalled the software back onto the computer using the terminal.

sudo apt-add-repository ppa:libreoffice/ppa
sudo apt-get install libreoffice

I open LibreOffice and find the latest version (4.1.4.2 as of writing this post) installed.

As far as complications with updating the software further, or interfering with other updates, I can’t say. I had already ran all other updates before reinstalling LibreOffice, and so the system is showing up-to-date. I will post a comment if I see the PPA in the sources list causing any other problems, or not updating LibreOffice beyond 4.1.4.2.

There are also some articles posted on elementaryupdates.com regarding ways to configure LibreOffice and other applications to fit more into the eOS appearance, in case anyone is interested.

Update 2015.08.31

On Linux Mint 17.2, I’ve realized that there is one additional step required in addition to what I had mentioned above to update to the latest version of LibreOffice (5.0.1 as I’m writing this). You have to set the priority for the package so that Mint’s update system will allow it to be updated/installed from the PPA. To do that, you need to create the file /etc/apt/preferences.d/libreoffice.pref and place the following inside of it:

Package: *
Pin: release o=LP-PPA-libreoffice
Pin-Priority: 700

This information was taken from the Mint here.