0
  • I was trying to install swig in ubuntu 16.04.
  • apt-cache show swig showing the following

Package: swig Priority: optional Section: universe/interpreters Installed-Size: 307 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Original-Maintainer: Torsten Landschoff <torsten@debian.org> Architecture: i386 Version: 3.0.8-0ubuntu3 Replaces: swig2.0 Depends: swig3.0 (>= 3.0.8-0ubuntu3) Suggests: swig-doc, swig-examples Conflicts: swig2.0 Filename: pool/universe/s/swig/swig_3.0.8-0ubuntu3_i386.deb Origin: Ubuntu

  • I need to install version 3.0.12

  • Downloaded the package from official website as swig-3.0.12.tar.gz and unzipped

  • Followed these instructions

  • Installation was successful.

  • Again checked the version, sudo apt-cache show swig

The version not updated to 3.0.12.

Any help would be appreciated !

EDIT 1 : I am trying to build one library using cmake and it requires swig 3.0.12. But since cmake always detects from apt-cache it is showing no valid version warning even if I had installed 3.0.11. This is the case for llvm also.

So what I am trying to ask is , how to point cmake to detect newer package version ?

  • 1
    Are you sure "cmake always detects from apt-cache"? AFAIK it uses its own FindSWIG.cmake procedure. What does swig -version say? – steeldriver Jun 30 '17 at 12:07
  • Yeah might be , By logic I assume that, I am not sure. But as you told if it is using FindSWIG.cmake procedure , then how do I fix this ? – deadbug Jun 30 '17 at 12:13
  • >swig -version >SWIG Version 3.0.8 Compiled with g++ [i686-pc-linux-gnu] Configured options: +pcre Please see http://www.swig.org for reporting bugs and further information – deadbug Jun 30 '17 at 12:16
  • Well I barely understand anything about cmake, however as far as I can tell swig is a bit of a special case in that it's looking for an executable tool rather than traditional build dependencies (header files and libraries). In this case, the fact that swig -version says 3.0.8 suggests to me that your build/install of swig-3.0.12 was not successful (in fact it looks rather hard to do on 16.04 since it seems to require a version of libpcre3-dev that isn't even available in the 16.10 repo). – steeldriver Jun 30 '17 at 12:32
2

apt-cache show shows the versions available / installed from the repositories or as deb-packages. It don't know anything about software you download and install by other means, like here by a tar.gz file you unpack and compile manually.

  • I understood your point, edited my question. – deadbug Jun 30 '17 at 9:32

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.