Ubuntu – Ubuntu 18.04 Unable to install Viber


I am trying to get Viber on my new Ubuntu 18.04 but I get these error …

sudo dpkg -i Downloads/viber.deb 
(Reading database ... 138136 files and directories currently installed.)
Preparing to unpack Downloads/viber.deb ...
Unpacking viber ( over ( ...
dpkg: dependency problems prevent configuration of viber:
 viber depends on libcurl3; however:
  Package libcurl3 is not installed.

dpkg: error processing package viber (--install):
 dependency problems - leaving unconfigured
Processing triggers for gnome-menus (3.13.3-11ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Errors were encountered while processing:

Best Answer

UPDATE: The same issue arises when you try to install the newest viber in ubuntu 20.04 (at least the beta until now), but with the problematic dependency being libssl1.0. Ubuntu has libssl1.1 installed.

The solution is the exactly the same, just use the corresponding names.

The problem is not only with the viber.deb file but also with the libcurl3 requirement of viber.deb.

In Ubuntu 18.04 libcurl3 cannot coexist with libcurl4 so you are going to face problems with other applications. In my case Viber and Steam could not coexist.

After some search I found the following solution which is to deb-package, fix the dependency and then build a new viber file.

The steps are:

  1. Save the viber.deb file in a folder
  2. Open the folder in a terminal
  3. execute the following commands
  4. dpkg-deb -x viber.deb viber
  5. dpkg-deb --control viber.deb viber/DEBIAN
  6. Edit viber/DEBIAN/control and replace "libcurl3" with "libcurl4" (also delete the last blank line from the file or you will get an error afterwards)
  7. dpkg -b viber viberlibcurl4.deb
  8. sudo dpkg -i viberlibcurl4.deb or install the .deb file with gdebi

Viber seems to work ok with libcurl4 atleast for me until now.

I found the solution here, in a comment...


Related Question