32

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 (7.0.0.1035) over (7.0.0.1035) ...
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:
 viber
Adelin
  • 491
  • 1
  • 6
  • 11
  • 3
    Looks like the Viber people need to provide a package for 18.04 (or if this was one for Ubuntu 18.04 then they need to fix it) so that it depends on the correct dependencies. – JanC May 01 '18 at 19:05

9 Answers9

76

UPDATE: The same issue arises when you try to install the newest viber 12.0.0.7 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...

https://linuxconfig.org/how-to-install-viber-on-ubuntu-18-04-bionic-beaver-linux

  • 3
    How is still not fixed by viber themselves? – D. Dan Sep 13 '18 at 10:15
  • 2
    Rakuten is a company. They make shareholders happy. Shareholders are happy when 95% of users are happy. 95% of users are happy when windows/osx/android/ios versions work. – Mr. Developerdude Oct 15 '18 at 18:03
  • Hope it's OK if I bump in here: the above doesn't work for me. When I try it, or when I try to install viber with the "software-center" on ubuntu, nothing happens. I did all the above, but when I type ´viber´ into the terminal, it says the command isn't found, and ´which viber´ gives nothing too. – Marses Nov 02 '18 at 10:38
  • It appears somehow the link to viber didn't get put on my system path? I found ´viber.desktop´ in ´/usr/share/applications/´, and with ´cat´ turns out there is an executable in ´/opt/viber/Viber´, which seems to run Viber. However, what does this mean? Does the system not look for executable files there, and if so, why did Viber get put there? How do I make it "visibile" to the system with ´which´, when running from terminal or when searching for the application? – Marses Nov 02 '18 at 10:52
  • This does help. However, the Viber now runs and only white dialogs are shown... (but I observed that Viber is actually running). This happened with the recent update of some components. I contacted the Viber Support and they do not plan to release new updates. Any idea how to solve this new issue? – Ljiljan Veselinovic Feb 17 '19 at 13:57
  • I also have the problem of a white screen. One answer said to run as sudo, but there is no viber file in usr/bin – Bhikkhu Subhuti Mar 15 '19 at 19:46
  • I was able to get this working by installing the snap listed below viber-unofficial – Bhikkhu Subhuti Mar 17 '19 at 06:41
  • 1
    @D.Dan, https://i.stack.imgur.com/DMjli.png – Roman Grinyov Aug 20 '19 at 20:59
16
sudo dpkg -i --ignore-depends=libcurl3 viber.deb

Works perfectly for me.

Update: @borowis is right: after installing this way it gets uninstalled on fix broken dependencies. Another one line, but still workable solution is:

sudo apt install libcurl3 ~/viber.deb 

source: https://linuxconfig.org/how-to-install-viber-on-ubuntu-18-04-bionic-beaver-linux

Tradunsky
  • 169
8

The easiest way is to convert the rpm package on Viber website to a deb package. To do that:

Download the rpm package with:

wget https://download.cdn.viber.com/desktop/Linux/viber.rpm

Install alien, convert the rpm package and install the newly created deb package:

sudo apt-get install alien
sudo alien --to-deb --scripts viber.rpm
sudo dpkg -i viber_7.0.0.1035-3_amd64.deb

The conversion will take about 5 minutes. Be patient!

4

If you don't mind to use snap, you can install Viber easily from Snap Store:

sudo snap install viber-unofficial

Disclaimer: I've added this snap to snap store.

uglide
  • 91
  • 3
  • This seems to be the only solution now. The previous accepted answer is no longer working. Snap was invented to solve this very exact problem – Bhikkhu Subhuti Mar 17 '19 at 06:42
  • This is great and it worked. However the package is outdated and is still on version 7.0 – chrisbjr Apr 08 '20 at 07:25
  • The Viber app previously had an issue with high DPI screens, making it appear too large and unusable. viber-unofficial has the same problem. With Viber it was fixable by setting an environment variable (QT_SCALE_FACTOR), e.g. in the .desktop file. But for some reason it's not working for me with viber-unofficial. Is the .desktop file always read from /var/lib/snapd/desktop/applications ? – Marses Apr 10 '20 at 14:00
3

The solution to installing Viber on Ubuntu 18.04 is to explicitly include the libcurl3 package prerequisite as part of the apt installation command:

sudo apt install libcurl3 ~/Downloads/viber.deb

How to install Viber on Ubuntu 18.04 Bionic Beaver Linux

You can also just install the flatpak version from flathub.org

Ivan V.
  • 391
  • 2
  • 7
  • 'Warning' section from 'Install Viber' from your link seems to be working great. I advise everyone try it with libcurl4 – Ivan Yarych May 07 '18 at 07:26
1

After trying some above answers I found another solution. There is a cURL PPA which supports both cURL version 3 and 4.

https://launchpad.net/~xapienz/+archive/ubuntu/curl34

So, I added this PPA to my Ubuntu 18.04 and installed cURL from there. Then I installed Viber with this below command-

sudo dpkg -i viber.deb

And Viber is working fine till then.

No broken package warning till now and libcurl4 package is installed.

0

The better way to install single deb-packages it to use APT-tool, which will solve all dependencies automatically:

sudo apt-get install ./Downloads/viber.deb 
N0rbert
  • 99,918
0

You can install libcurl3 and remove libcurl4.

All the programs as far as I know, like Opera and Brackets work fine with either.

Go to terminal and type:

sudo apt install libcurl3

When asked for confirmation press y

This will automatically remove all libcurl4 and it's dependencies and install libcurl3.

As a precaution do:

sudo apt install -f

to fix any dependency issues that may occur.

Now download the viber debian package from their official site.

In terminal type

sudo dpkg -i viber.deb
sudo install -f

This should install viber without any trouble.

Now open viber from launchpad.

Happy chatting in viber :)

Sonevol
  • 696
0

Viber released version 10.30, so this problem is solved. I recommend the installation of the latest version.