You are not logged in.

#1 2016-06-24 10:16:21

jibinjose
Member
Registered: 2016-06-11
Posts: 1

diff bw install using `yaourt` and download a tarball, extract to /opt

What are the difference between  install using `yaourt` and download a tarball, extract to /opt and create a symlink
For example , I want to install sublime text editor. I can do
           sudo yaourt -S sublime-text-dev
                            or
download a tarball from http://www.sublimetext.com/ and extract it to /opt and create a symlink.

I am new to Linux and I am wandering what are the differences between them?

Offline

#2 2016-06-24 11:32:49

mis
Member
Registered: 2016-03-16
Posts: 234

Re: diff bw install using `yaourt` and download a tarball, extract to /opt

If you install it manually, the package manager (pacman on Arch Linux) does not know anything about the files you installed. In general  it's not a good idea to do this.

Offline

#3 2016-06-24 19:12:55

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: diff bw install using `yaourt` and download a tarball, extract to /opt

I'm not going to repeat anything mis already said, but merely expand on it. While manually installing to /opt should be safe, as package managers are not supposed to touch /opt, creating symlinks may not be. Depending on where do you create those symlinks. If you place those symlinks in /usr/{bin,lib,$WHATEVER} and later use your package manager (in this case pacman) to install some package that wants to install to /usr/bin and has an executable of the same name pacman will complain about file conflicts and will error out. On the other hand a badly writen PKGBUILD could install in /opt and potentially cause the same problem. For this reason it is recommended to read every PKGBUILD from AUR before building. There's another problem. What if you decide to uninstall the package? How will you know what to remove if the package's Makefile doesn't contain an uninstall target? The same goes for upgrading the package. Installing manually also means resolving dependacies manually.

The part about upgrading is important on Arch (I'd argue on other distros too) as Arch doesn't support partial upgrades.

Everything up to this line was written under the assumption that the package will be built from source. If the package would be a precompiled tarball there'd be another, much bigger problem. Let's say that the package depends on libWhatever and thus is dynamically linked to libWhatever.so. That shared object file is most likely a symlink to the versioned file of the same lib. So, upstream has libWhatever.so.1 on their machines and thus their precompiled package expects that version. Yet on your Arch you've got the need library but it's newer and has a file libWhatever.so.2. This would result in runtime linking failure.

Now, if you use pacman/makepkg/abs to build a package from AUR pacman will know about every file installed by the package and, as a result, will be able to handle uninstalls, upgrades and dependancies.

Offline

#4 2016-06-24 19:15:48

Awebb
Member
Registered: 2010-05-06
Posts: 6,275

Re: diff bw install using `yaourt` and download a tarball, extract to /opt

The difference is, that people who extract to /opt and symlink have not read the Beginner's Guide to the end to notice a link called "General recommendations".

Offline

Board footer

Powered by FluxBB