97

I installed Cisco AnyConnect for Ubuntu(64) 12.04, but it failed. It can be installed on Ubuntu 10.10(64).

The error log

Installing Cisco AnyConnect VPN Client ...
Extracting installation files to /tmp/vpn.teuSIr/vpninst096243274.tgz...
Unarchiving installation files to /tmp/vpn.teuSIr...
Starting the VPN agent...
/opt/cisco/vpn/bin/vpnagentd: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory

When I meet that,

locate libxml2.so.2
/usr/lib/x86_64-linux-gnu/libxml2.so.2
/usr/lib/x86_64-linux-gnu/libxml2.so.2.7.8

So I create symbol link libxml2.so.2 in /user/lib and after I do:

Installing Cisco AnyConnect VPN Client ...
Extracting installation files to /tmp/vpn.5cz4FV/vpninst001442979.tgz...
Unarchiving installation files to /tmp/vpn.5cz4FV...
Starting the VPN agent...
/opt/cisco/vpn/bin/vpnagentd: error while loading shared libraries: libxml2.so.2: wrong ELF class: ELFCLASS64

I ensure that there exist lib32 runtime lib on my device.

How can I fix this?

Tim
  • 32,861
  • 27
  • 118
  • 178
chuck
  • 1,071
  • That ELFCLASS64 seems to suggest you're using a 64bit software on a 32bit OS. Did yuo make sure you're using the 32bit edition of the software? – Thomas Ward Jun 22 '12 at 16:48
  • yes, it is really 32bit ediation software. – chuck Jun 22 '12 at 17:02
  • i used ubuntu-12.04-desktop-amd64.iso installed.

    Linux chuck 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

    file /opt/cisco/vpn/bin/vpnagentd

    /opt/cisco/vpn/bin/vpnagentd: setuid ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, stripped

    From the above info, i confirm that the tool is 32bit edition software, and my os is 64bit.

    – chuck Jun 22 '12 at 17:07
  • i make a problem, i rebuilt lib32-libxml2, and relink tha share lib. Then i found is can be install successfully.

    but it still can work normally. that was strage, From the dmesg, i found vpn module already load.

    – chuck Jun 22 '12 at 17:31
  • i try to manually run vpnui, found some errors.chuck@chuck:/opt/cisco/vpn/bin$ ls manifesttool vpn vpnagentd vpndownloader vpndownloader.sh vpnui vpn_uninstall.sh chuck@chuck:/opt/cisco/vpn/bin$ ./vpnui ./vpnui: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory so i build lib32-atk for that. – chuck Jun 22 '12 at 17:40
  • In general, when debugging issues loading shared libraries the ldd command can be used to show which libraries fail to resolve. – Drew Noakes Dec 11 '14 at 16:32

12 Answers12

151

If you don't need the "official" Cisco AnyConnect VPN software, I highly recommend installing the "network-manager-openconnect-gnome" package in the Ubuntu Repository. It uses OpenConnect which is an open source client for AnyConnect.

Anyhow, that package allows for you to configure and manager your AnyConnect VPN connections through the normal network manager.

I have been using that to connect to my work VPN for the past few months and it has been working great!

You can find the package in the Ubuntu Software Center or Synaptic by searching for "OpenConnect." If you wish to install it via the command-line, you can do so with:

sudo apt-get install network-manager-openconnect openconnect

For the GUI you can additionally install the *-gnome package using:

sudo apt-get install network-manager-openconnect-gnome

This adds an option to Network Connections. When you choose to add a connection, there'll be a new option under VPN Connections to add a "Cisco AnyConnect Compatible VPN (openconnect)". You can then connect to the VPN through the networks applet (in the system tray).

NotTheDr01ds
  • 17,888
John Vrbanac
  • 4,627
  • I use this too in place of the cisco software, but it's really just a workaround. My University is doing an update of cisco this week and I'm a little antsy it will break the compatability – Ian B. Aug 08 '12 at 12:32
  • 2
    This solution did not work for me on 64-bit Ubuntu 14.04. It did not offer the UI needed to connect, I missed e.g. an option to enter group and user name and password. – Jan Vlcinsky Jun 11 '14 at 22:11
  • 13
    I like this answer (as it worked for me), but feel it's missing half of the explanation. This adds (at least on Linux Mint) an option to Network Connections. When you choose to add a connection, there'll be a new option to add a "Cisco AnyConnect Compatible VPN (openconnect)". You can then connect to the VPN through the networks applet (in the system tray). This seems the ideal place for it. – Kat Jul 22 '14 at 19:50
  • Openconnect GUI via network manager does not allow proxy connections. Only the CLI mode does. This is a drawback for openconnect – Ubuntuser Jul 15 '15 at 19:13
  • 1
    Still works like a charm. Only needed to insert the gateway in NWM and the rest was just point and click the cert, username and password. – Rinzwind Oct 21 '15 at 06:33
  • 2
    This one should be the accepted answer, I have been looking for this ages! – Maduka Jayalath Nov 28 '15 at 08:36
  • 3
    Downloading "official" Cisco AnyConnect VPN software is not available for every body. "network-manager-openconnect-gnome" works fantastic. :) – Kayvan Tehrani Apr 21 '16 at 09:37
  • This ends abruptly for me with SSL connection failure: A TLS fatal alert has been received.. If I open the url (vpn...*) I have in a browser under Windows, there is a Cisco client installation. Could it be that that also installs and configures certificates etc.? Otherwise, I am currently just adding the url under "Gateway". Are none of the other fields important? A group name is the only other detail I have. – user643722 Mar 27 '20 at 13:06
35

Use openconnect! quite easy!

  1. First run command below to active th TUN module:

    sudo /sbin/modprobe tun
    
  2. Install OpenConnect:

    sudo apt-get install openconnect
    
  3. Connect to VPN, run:

    sudo openconnect yourvpn.example.com
    

Try this link it helped me : http://ubuntuhandbook.org/index.php/2014/11/connect-cisco-anyconnect-vpn-ubuntu/

prashanth-g
  • 451
  • 4
  • 5
19
  1. Install some VPN plug-ins for Network Manager:

    sudo apt-­get install network-manager-pptp network-manager-vpnc network-manager-openvpn network-manager-openconnect-gnome
    
  2. If prompted for your password, type it, and press Enter.

  3. If you're told that a package “is already the newest version,” ignore it and continue with the next command.

  4. If asked to “continue [Y/n],” press Y, followed by Enter.

  5. Open the connections settings dialogue, go to the VPN tab and add a new connection:

  6. Select “Cisco AnyConnect”:

Abdennour TOUMI
  • 9,357
  • 9
  • 44
  • 51
  • 2
    This worked for me on Ubuntu 14.04 64-bits. Just the network­-manager­-vpnc. And the connection seems stable so far. – Jan Vlcinsky Jun 11 '14 at 22:13
  • I tried this under Ubuntu 14.04 64-bit. The VPN compatible Cisco Anyconnect (openconnect) option is not available. It states the ...may not have correct VPN plug-in installed. – Jacques MALAPRADE Aug 06 '15 at 08:21
  • 2
    Need to install sudo apt-get install network-manager-openconnect-gnome which contains the required plug-ins. – Jacques MALAPRADE Aug 06 '15 at 08:30
  • Stupid question but I don't have the Icons on the top right on the bar (amongs which is the network connections one) any way to turn those on. Or a another way to get to the same options. – Kvothe Jun 12 '18 at 14:53
  • This doesn't work for me because one of the required configurations is "group name" and "group password". I have no idea what those should be and neither the official client or openconnect require them. – Vectorjohn Feb 07 '20 at 23:47
4

I encountered a similar issue earlier. I observed that vpnagentd does not load because of libatk1 and vpnui does not load because of libxml2. Installing the 32-bit versions of these libraries resolves the issues. You should install ia32-libs to resolve the issue using

sudo apt-get update
sudo apt-get install ia32-libs

This should resolve the issue for you on Ubuntu 64 bit versions. I have tried it on Ubuntu 11.10 and Ubuntu 12.04.

Eliah Kagan
  • 117,780
4

I just installed openconnect. Works similarly to the anyconnect command line utility.

sudo apt-get install openconnect
jumpnett
  • 5,975
3

As of Ubuntu 18.04, OpenConnect VPN client is available as an add-on to GNOME Control Center, as shown here:

enter image description here

To enable this add-on, you can search for 'openconnect' in ubuntu software center like so:

enter image description here

Then click on gnome control center and check the checkbox for 'OpenConnect VPN Client'.

dstandish
  • 131
  • 1
2

Never mind, I installed OpenConnect with the instructions here. Finally, I don't have to deal with that Cisco garbage!

S.V.
  • 103
  • 2
Hypercube
  • 676
  • 2
    Dang, that link is broken. – Patrick Mar 25 '14 at 19:29
  • 1
    Here's an archived version: http://web.archive.org/web/20110312103407/http://faq.oit.gatech.edu/content/cisco-anyconnect-installation-instructions-linux

    I don't remember why exactly I used those instructions.

    – Hypercube Mar 25 '14 at 23:37
1

In my casevpnagentd would not load. Installing the packages

sudo apt-get install lib32z1 lib32ncurses5

however, resolved the problem for me. The terminal promted the message to install these, when I tried to install ia32-libs, which seems to be obsolete.

Jarno
  • 286
  • 3
  • 12
  • Thank you. That's what finally worked for me too (Ubuntu 15.04, 64-bit). I actually found that information here: http://www.socsci.uci.edu/~jstern/uci_vpn_ubuntu/ – GlenPeterson Nov 13 '15 at 22:56
1

Here are procedure that worked for me on Ubuntu 64 bit desktop 14.04.3

sudo apt-get install -y lib32z1 lib32ncurses5 lib32bz2-1.0 libxml2:i386 libstdc++6:i386 libgtk2.0-0:i386 libpango1.0-0:i386

Now, I can ./vpnui to launch.

1

Just in case you do want the Ciso Anyconnect client working take a look at this blog. Just disable the Firefox Iced Tea web plugin and go to your VPN site. Have Ubuntu download the VPN installer and run the shell script. In my case Cisco Anyconnect VPN client was installed and available under the Internet section and works fine.

htorque
  • 64,798
ToonP
  • 123
0

1.Download ubuntu compatible anyconnect from https://its.gmu.edu/wp-content/uploads/anyconnect-linux64-4.10.00093-predeploy-k9.tar_-1.gz

2.then follow the steps as mentioned- https://its.gmu.edu/knowledge-base/how-to-install-cisco-anyconnect-on-linux/

Hiccup
  • 101
0

I have encountered similar issue earlier. I observed that vpnagentd does not load because of libatk1 and vpnui does not load because of libxml2. Installing the 32bit versions of these libraries resolves the issues. You should install ia32-libs to resolve the issue using

sudo apt-get install ia32-libs

This should resolve the issue for you on Ubuntu 64bit versions. I have tried it on 11.10 and 12.04.

Peachy
  • 7,117
  • 10
  • 38
  • 46