1

I'm a new linux user running Mint 17.3. I want to install a program I downloaded as a .tar file. I extracted the contents of the .tar. Now I see folders:

programname/lib
programname/bin
programname/include

There are files in those folders but nothing that looks like an install file. I'm not sure where to go from here to install this program. Any help would be great.

  • You're probably going to need to include more information than that, e.g. what the program is that you're trying to install. The fact that you downloaded the software as a TAR file probably isn't going to have a whole lot to do with the installation process. – igal Dec 11 '17 at 0:00
  • the software is SmartCash wallet smartcash.cc/wallets – firsttube Dec 11 '17 at 0:04
  • In this case, just copy the files to system folder. copy bin to /usr/bin, lib to /lib – frams Dec 11 '17 at 0:06
  • ok so I copy the contents of the bin folder to /usr/bin and contents of the lib folder to /usr/lib ? or just /lib ? – firsttube Dec 11 '17 at 0:12
  • both /usr/lib and /lib works, Linux will find the file anyway – frams Dec 11 '17 at 0:13
2

Short Answer

It looks like your download has a collection of precompiled files. In order to "install" them you'll just need to copy or move each file to an appropriate location.

In this case you'll probably just want to copy all of the files from each subdirectory of smartcash-1.0.0 to the corresponding subirectory of /usr/local, e.g.:

cp -i smartcash-1.0.0/bin/* /usr/local/bin
cp -i smartcash-1.0.0/include/* /usr/local/include
cp -i smartcash-1.0.0/lib/* /usr/local/lib

That's it. Once you do that you should be able to run four new commands:

smartcash-cli
smartcash-qt
smartcash-tx
smartcashd

Long Answer

Here is what I did to try to figure out what you're dealing with. First I downloaded the TAR archive:

wget 'https://smartcash.cc/wp-content/uploads/2017/11/smartcash-1.0.0-x86_64-linux-gnu.tar.gz'

Then I decompressed the archive:

tar xzf smartcash-1.0.0-x86_64-linux-gnu.tar.gz

Then I viewed the resulting directory:

tree smartcash-1.0.0

Here is the output from tree:

smartcash-1.0.0
|-- bin
|   |-- smartcash-cli
|   |-- smartcash-qt
|   |-- smartcash-tx
|   `-- smartcashd
|-- include
|   `-- bitcoinconsensus.h
`-- lib
    |-- libbitcoinconsensus.so -> libbitcoinconsensus.so.0.0.0
    |-- libbitcoinconsensus.so.0 -> libbitcoinconsensus.so.0.0.0
    `-- libbitcoinconsensus.so.0.0.0

It looks what we have are some precompiled executable programs (in the 'bin/' subdirectory), some shared libraries (in the lib/ subdirectory), and a header file (in the include subdirectory).

In general, you probably want to put executables into a directory that's in your path. To see the directories in your PATH you can run the following command:

(IFS=:; for path in ${PATH[@]}; do echo "${path}"; done)

Here is what the output might look like:

/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin

A typical place to put these would be /usr/local/bin. You could that with a command such as the following:

cp -i smartcash-1.0.0/bin/* /usr/local/bin

The shared library files should go in a directory that's in your shared-library search-path. To see what your shared-library search-path is you should check the /etc/ld.so.conf configuration file. Here's what's in mine:

include /etc/ld.so.conf.d/*.conf

So it's including configuration files from the /etc/ld.so.conf.d directory. Checking the contents of that directory (i.e. cat /etc/ld.so.conf.d/*) reveals the following list of directories:

/usr/lib/x86_64-linux-gnu/libfakeroot
/usr/local/lib
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu

So I would put the files in the /usr/local/lib directory, e.g.:

cp -i smartcash-1.0.0/lib/* /usr/local/lib

For further discussion on the subject of where to put shared libraries you might want to refer to the following posts:

Finally, you'll probably want to put the header file in /usr/local/include - for the sake of consistency, e.g.:

cp -i smartcash-1.0.0/include/* /usr/local/include

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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