How to install libs in linux

How to install library files

I installed skype translting software CLOWN FISH in linux(ubuntu 14.04 LTS). But it was not working properly. In the clown fish website they have specified required library files for the proper working of the software. The following are the files. How do I install those files

libgtk-x11-2.0.so.0
libgdk-x11-2.0.so.0
libgdk_pixbuf-2.0.so.0
libfontconfig.so.1
libXrender.so.1
libX11.so.6
libgobject-2.0.so.0
libXft.so.2
libfreetype.so.6 libpthread.so.0
librt.so.1
libz.so.1
libpng12.so.0
libstdc++.so.6
libm.so.6
libgcc_s.so.1
libc.so.6

there is no error message showing up while opening ClownFish. But the translation is not happening. In the site its said that «if yu have any problem with working , check the library files and and install missing ones» . So I checked the root/user/lib folder. All required lib files are not there. This is the site link clownfish-translator.com/linux.html

Take another look to /usr/lib’ (not /user/): is there a /usr/lib/i386-linux-gnu/libfontconfig.so.1` and/or /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 for example? But anyway, try the hint of @Rinzwind, looks good.

1 Answer 1

In its Search the contents of packages section, search for the file.

It will list the packages that contain particular file.

In your case, these packages are provided by the following packages:

libgtk-x11-2.0.so.0 libgtk2.0-0 libgdk-x11-2.0.so.0 libgtk2.0-0 libgdk_pixbuf-2.0.so.0 libgdk-pixbuf2.0-0 libfontconfig.so.1 libfontconfig1 libXrender.so.1 libxrender1 libX11.so.6 libx11-6 libgobject-2.0.so.0 libglib2.0-0 libXft.so.2 libxft2 libfreetype.so.6 libfreetype6 libpthread.so.0 libc6 librt.so.1 libc6 libz.so.1 zlib1g libpng12.so.0 libpng12-0 libstdc++.so.6 libstdc++6-4.8-dbg-arm64-cross libm.so.6 libc6 libgcc_s.so.1 libgcc1 libc.so.6 libc6 

So you can install them by:

sudo apt-get install libgtk2.0-0 libgdk-pixbuf2.0-0 libfontconfig1 libxrender1 libx11-6 libglib2.0-0 libxft2 libfreetype6 libc6 zlib1g libpng12-0 libstdc++6-4.8-dbg-arm64-cross libgcc1 

Источник

How to install c++ library on linux

I am a noob in Linux environment.
I am using ubuntu 13.10 and I want to install Armadillo. The readme file said that I should install three other libraries first, LAPACK, BLAS and ATLAS.
I downloaded lapack-3.5.0, but I don’t know how to install it(I only know apt-get install for installation). I found the installation steps inside the readme file as:

  • LAPACK can be installed with make. Configuration have to be set in the make.inc file. A make.inc.example for a Linux machine running GNU compilers is given in the main directory. Some specific make.inc are also available in the INSTALL directory
  • LAPACK includes also the CMAKE build. You will need to have CMAKE installed on your machine (CMAKE is available at http://www.cmake.org/). CMAKE will allow an easy installation on a Windows Machine

I have installed make and cmake but what should I do next?
I would like to ask for a big picture about this kind(compile from source? I am not sure is this the correct discription) of installation concept and also steps for installation.
My understanding about installation is only come from installing a game in Windows that is specifying a path and then input install command and then finish. Is that similar to this case?

Yeah, this is compilation from source. Usually, C and C++ libraries for Unix systems are built using the ./configure; make; make install sequence of commands. See this.

2 Answers 2

enter image description here

  1. From a linux terminal at the console, enter sudo synaptic Synaptic is basically a GUI built around apt-get and related commands. A window will appear, like this one:
  2. In the «Quick filter» box, enter each of these to seach for packages and then checkbox select the various packages if they are unselected. You probably want the -dev versions to get the C/C++ headers and the -doc packages to get the man pages, as well as the main package:
    • libblas
    • liblapack
    • libatlas
  3. Click the green apply checkmark and the packages will be downloaded and installed
  4. Enjoy!

Note: sometimes people need the very latest libraries, for bugfixes, extra features, but the ones available through synaptic will be older, from your official linux distribution archive. This can be fixed by adding ppa repositories with the add-apt-repository command, if there is a ppa repository with the latest code somewhere and you know its name/address.

If you need to do this on a VPS over ssh in text mode, and you can’t get synaptic running, you can go back to apt-get. If you can run synaptic locally, you can use it to scout the package names. Or, you can use apt-cache search blas | less to search for package descriptions containing the string «blas».

Источник

Where do I put third-party libraries to set up a C++ Linux development environment?

I’m not new in C++ although I’m new in Linux. I’m using CMake to precompile a cross-platform game engine with some third-party components, but I have a lot of doubts about using libraries. My question is how to work with third-party libraries and where to put them. Apt installs libs in their official place (/usr/local, /usr/lib/ ..) but I develop in Windows using local libs that are in a folder in my project dir. Also, I need a good tutorial to know the rules of how libraries work. For example: when trying to compile my project, luabind is asking for liblua.s0.1, but AFAIK there is no way to generate this library with the source provided by Lua (at least doing make, make install). I know, this question is fuzzy but I haven’t enough experience to be more concise. Update: After reading some answers, a more concise question is the following. If I install all third-party libraries, how can I distribute my program? How do I manage dependencies without using a large readme?

4 Answers 4

Where to put libraries

The best solution is to use your Linux distribution’s packaging system ( apt-get , yum , or similar) to install libraries from distro-provided packages wherever possible.

If the distro’s packaged libraries aren’t of a recent enough version, or if you need some nonstandard build options, or if you need a library that your distro doesn’t provide, then you can build and install it yourself. You have two main options for where to put the library:

  • /usr/local (libraries under /usr/local/lib , headers under /usr/local/include ). This installs the libraries systemwide and is probably the simplest solution, since you should then be able to build against them without taking any extra steps. Do NOT install libraries directly under /usr , since that will interfere with your distro’s packaging system.
  • Under your project directory, as you did under Windows. This has the advantages of not requiring root access and not making systemwide changes, but you’ll have to update your project’s include paths and library paths, and you’ll have to put any shared library files someplace where the dynamic linker can find them (using LD_LIBRARY_PATH or ld.so.conf — see the link for more details).

How libraries work

See David A. Wheeler’s excellent Programming Library HOWTO. I’d recommend reading that then posting any specific questions as new topics.

How to distribute your program

Traditionally, Unix / Linux programs do not include copies of their dependencies. It’s instead up to the end user or developer to install those dependencies themselves. This can require a «large README,» as you said, but it has a few advantages:

  • Development libraries can be installed, managed, and updated via the distro’s package manager, instead of each source copy having its own set of libraries to track.
  • There’s only one copy of any given library on a system, so there’s only one place that needs updating if, for example, a security flaw is found. (For example, consider the chaos that resulted when zlib, a very widely used compression library, was found to have a security flaw, so every application that included an affected version needed to be updated.)
  • If your program is popular enough (and is open source or at least freely available), then package maintainers for various Linux distributions may want to package it and include it in their distro. Package maintainers really don’t like bundled libraries. See, for example, Fedora’s page on the topic.

If you’re distributing your program to end users, you may want to consider offering a package ( .dpkg or .rpm ) that they could simply download and install without having to use source. Ideally, from the end user’s perspective, the package would be added to distros’ repositories (if it’s open source or at least freely available) so that users can download it using their package managers ( apt-get or yum ). This can all get complicated, because of the large number of Linux distros out there, but a Debian/Ubuntu compatible .dpkg and a Red Hat/CentOS/Fedora-compatible .rpm should cover a good percentage of end users. Building packages isn’t too hard, and there are good howtos online.

Источник

How do I install ALL development libraries?

I want to preinstall all the libraries one could ever need onto a system so someone building something would always have the libraries available. Like in a computer lab where users are not root. I want to do something like apt-get install lib* but I don’t think that will be a good idea. Is there a package like most-libs-used?

4 Answers 4

apt-cache search dev|grep "\-dev"|cut -d' ' -f1|sort > available-devs.txt

It will create the file available-devs.txt with a list of all available -dev packges in the archive (and within any PPAs or other archives you have added). You can then go and install them all. You can’t install them all at the same time, as there are more package names than allowable program arguments in a POSIX system, so you’ll have to install some bit by bit. Also, if you really want to install all of them, I hope you have a very large storage system for your main OS partition.

Also, that only grabs the ones for the arch you’re currently on, I think. To install both i386 and x86_64 versions on a 64-bit Ubuntu install, you’d need even more space, and have to install a lot more of the same, with :i386 appended to the package name. But not all libraries in the archive are set up for MultiArch support yet.

On versions of Ubuntu with multarch support enabled by default (11.10 and later), the metapackage ia32-libs-multarch has many of the commonly needed library packages as dependencies. Of course, ia32-libs-multarch only exists on 64-bit systems, and it provides 32-bit libraries. Installing it will probably not do what you want.

But you can use its list of dependencies (that’s for 12.04, here’s 11.10) as a reference for what libraries you might want to install to support software users run that is not provided by Ubuntu packages. (If software is provided by Ubuntu packages, then you have to be able to run commands as root to install it normally, and then dependencies will just be installed as needed.)

On Ubuntu 12.04, you can install those packages manually (that is, the versions for the system’s actual architecture):

sudo apt-get install install bluez-alsa gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-base gstreamer0.10-plugins-good gtk2-engines gtk2-engines-murrine gtk2-engines-oxygen gtk2-engines-pixbuf gvfs ibus-gtk libacl1 libaio1 libao4 libasound2 libasound2-plugins libasyncns0 libattr1 libaudio2 libcanberra-gtk-module libcap2 libcapi20-3 libcups2 libcupsimage2 libcurl3 libdbus-glib-1-2 libesd0 libfontconfig1 libfreetype6 libgail-common libgconf-2-4 libgdbm3 libgettextpo0 libglapi-mesa libglu1-mesa libgphoto2-2 libgphoto2-port0 libgtk2.0-0 libmpg123-0 libncursesw5 libnspr4 libnss3 libodbc1 libopenal1 libpulse-mainloop-glib0 libpulsedsp libqt4-dbus libqt4-network libqt4-opengl libqt4-qt3support libqt4-script libqt4-scripttools libqt4-sql libqt4-svg libqt4-test libqt4-xml libqt4-xmlpatterns libqtcore4 libqtgui4 libqtwebkit4 librsvg2-common libsane libsdl-image1.2 libsdl-mixer1.2 libsdl-net1.2 libsdl-ttf2.0-0 libsdl1.2debian libsqlite3-0 libssl0.9.8 libssl1.0.0 libstdc++5 libstdc++6 libxaw7 libxml2 libxp6 libxslt1.1 libxss1 libxtst6 odbcinst1debian2 xaw3dg libgl1-mesa-dri libgl1-mesa-glx libnss-ldap libpam-ldap libpam-winbind 

You can do this on previous releases too, though you’ll have to change some of the versions numbers in the package names (which ones need it will become apparent if you jus try running the command as-is, and you can look up packages with similar names here. For Ubuntu 11.10, you could install the packages named as dependencies here. (Though it would probably be easier to look at error messages from running the above command, and just substitute the small handfull of packages from that list.)

Источник

Читайте также:  Файловый поиск в linux
Оцените статью
Adblock
detector