Installing Opera on distributions other than Debian, Ubuntu or derivatives

The following was originally on GitHub but as it is effectively a blog post I decided to move it here.


Introduction

If there is no official Opera provided package for your Linux distribution of choice, there are various alternative options that will allow you to install Opera. First and foremost, you should check if your distribution offers recent versions of Opera (version 26 and above). For example Arch, Gentoo, PClinuxOS, and Russian Fedora all provide packages for their users. If your distro of choice does not, you may wish to ask them to consider it. Opera's license allows it to be repackaged and distributed directly on Linux. A copy of this license is included in our official .deb package. Please refer to it for more details.

Below I provide links the currently known packages and repositories. If your distro isn't listed, try one of my scripts that convert the .deb and keep Opera up to date or read the manual installation instructions (for those who want to understand what is involved).

Before you read on, you should be aware that, whilst I am an Opera employee, none of the following is officially supported by Opera Software.

Distros where repackaging has already been done

  • Arch Linux
  • Fedora
  • Gentoo
    • Opera stable, beta and developer are all available on Gentoo (Thanks Jeroen Roovers)
  • Mageia
    • rpm4opera: Automatically downloads and converts the latest Opera Debian packages into .rpm format.
  • OpenSUSE
  • PCLinuxOS
    • Opera stable is available in the PCLinuxOS repository (Thanks to the PCLinuxOS team and also to nobuyuki-ito, whose .spec file is used as the basis for their own)
    • rpm4opera: Automatically downloads and converts the latest Opera Debian packages into .rpm format.
  • Slackware
    • latest-opera: Automatically downloads and converts the latest Opera stable Debian package into Slackware's package format.
    • SlackBuild: a SlackBuild (Thanks Vladislav Borisov)

Note: If you have made a repack script for your distro or helped to get opera-developer included in a repository, let me know in the comments below and I will link to it. That way others can also benefit.

Automated solutions

The following are three scripts that I wrote, which automate the process of converting the Opera Debian package for use on any modern distribution. I would however still encourage you to read the manual steps below, to better understand what is happening.

  • rpm4opera: Automatically downloads and converts the latest Opera Debian packages into .rpm format.
  • latest-opera: Automatically downloads and converts the latest Opera stable Debian package into Slackware's package format.
  • install-opera: Automatically downloads and extracts the latest Opera Debian package, installing it's contents into /usr/local. This script can also be run as a cron job to ensure that Opera is always up to date. An uninstall script is also created and installed as well.
  • standalone-opera: Unpacks an Opera Debian package into a similarly named directory and creates a startup script that will cause Opera to save its profile within this directory (Useful for testing multiple versions side-by-side or for installs you take with you on an external USB disk). No option to autoupdate is provided.

Note: I wrote the above for my own use, in my spare time. Additionally, while I work at Opera but I am not a developer! This makes them completely unofficial and unsupported. Usage of them is at your own risk.

Installing Opera manually

Most people would probably be better off using my install-opera to automate the entire process of installing and keeping Opera up to date. However, if you would like to understand what is happening or need some hints to work around common issues because you are planning your own repackaging script, then read on.

Extract the tar archive

As your regular user issue the following command to extract out the data.tar archive from the .deb package:

ar x opera-stable_26.0.1656.60_amd64.deb data.tar.xz
xz --decompress data.tar.xz

Note: the ar command is provided by the GNU Binutils package.

Install Opera into /opt

Issue these commands to install Opera:

tar --extract --file=data.tar --directory=/opt \
  --strip-components=4 \
  ./usr/lib/x86_64-linux-gnu/opera
chmod 4755 /opt/opera/opera_sandbox

For desktop environment integration (shortcuts) and to avoid having to type the entire path each time you start Opera, issue the following:

tar --extract --file=data.tar --directory=/usr/local \
  --strip-components=2 \
  ./usr/share/applications/opera.desktop \
  ./usr/share/icons/hicolor/128x128/apps/opera.png
ln -fs /opt/opera/opera /usr/local/bin/opera

Note: You will need to be root or preface all of the above commands with sudo.

Running Opera

Start Opera as you would any other Linux application, either from the command line or via your Desktop Environment's application menu. If you encounter problems or want to upgrade Opera read on. Otherwise, you are done.

Note: You may need to logout and back into your Desktop Environment before Opera is found and the icon is shown correctly in your application launcher.

Upgrading Opera

Upgrading Opera involves removing the /opt/opera directory and then installing the core files from a newly extracted data.tar.

rm -rv /opt/opera
tar --extract --file=data.tar --directory=/opt \
  --strip-components=4 \
  ./usr/lib/x86_64-linux-gnu/opera
chmod 4755 /opt/opera/opera_sandbox

Note: You will need to be root or preface the above commands with sudo.

Uninstalling Opera

rm -rv /opt/opera
rm -v /usr/local/bin/opera 
rm -v /usr/local/share/applications/opera.desktop 
rm -v /usr/local/share/icons/hicolor/128x128/apps/opera.png

Note: You will need to be root or preface the above commands with sudo.

comments powered by Disqus