You are not logged in.

#1 2014-06-20 17:45:28

Peilonrayz
Member
Registered: 2014-03-10
Posts: 3

[Solved] 'Best' way to install programs?

I was wondering what the arch Linux community thought the best way to install things is.

I was wondering if compiling things from source would be better in some cases then using Pacman, I'm sure I read that you prefer people to install from source, when I was reading the tex live wiki. Now I could have been wrong, read something wrong or just not understood.
I'm sure this makes the program faster, and makes me be able to install them to my every need, but then is updating and keeping them up to date problematic? Should I install OpenGL and mesa from source, and leave the rest like Firefox to Pacman?

I am new to Linux, and haven't compiled anything from source, and would like to know how to.

Last edited by Peilonrayz (2014-06-21 12:03:57)

Offline

#2 2014-06-20 17:49:07

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,095
Website

Re: [Solved] 'Best' way to install programs?

Even if you compile from-source, you should still install using pacman. PKGBUILDs are your friends.

All the best,

-HG

Offline

#3 2014-06-20 17:50:17

samiam
Banned
From: EAX
Registered: 2010-08-20
Posts: 58

Re: [Solved] 'Best' way to install programs?

See https://aur.archlinux.org/

I prefer packer to manage it, but I'm sure you'll get other suggestions.

I'd highly recommend staying away from compiling from source. If you don't know how to make a PKGBUILD for whatever it is you're compiling by hand, you'll probably regret doing it.

Offline

#4 2014-06-20 17:54:09

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

Re: [Solved] 'Best' way to install programs?

Wether you build packages from source or use binary packages from the repos you should install using pacman. If you want a package that is not in the repos nor in the AUR find the source and write PKGBUILD for it. After that feel free to submit it to AUR.

Offline

#5 2014-06-20 18:14:42

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: [Solved] 'Best' way to install programs?

Learn how to use makepkg. Just follow the links in the wiki page HalosGhost linked to. Sooner or later you'll see mention of "AUR helpers," which are scripts that can automate some of the fetch-and-build process for you; I'd strongly recommend against using one until you're familiar with how makepkg and the whole Arch Build System function.

Now since TeX is mentioned in the initial post, it's worth mentioning that there are special exceptions to the "Always build source with makepkg, install with pacman" rule, and that's considered one of them because TeX is a complex software suite that has its own maintenance and update process. But these exceptions are rare, pacman packages often exist for them anyway, and you'll only encounter them if you explicitly look for them. Nearly all from-source packages will be handled with makpkg.

Offline

#6 2014-06-20 19:04:14

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [Solved] 'Best' way to install programs?

Wow, so many questions! smile

Peilonrayz wrote:

I was wondering what the arch Linux community thought the best way to install things is.

The best way to install things is to use pacman. If a package is not available from pacman, then use the AUR. If a package is not available from the AUR, then I will PERSONALLY make the package for you. smile

I was wondering if compiling things from source would be better in some cases then using Pacman

It's not better for me. pacman is much much faster and easier.

I'm sure I read that you prefer people to install from source, when I was reading the tex live wiki. Now I could have been wrong, read something wrong or just not understood.

Can you please show me what you are referring to?

I'm sure this makes the program faster, and makes me be able to install them to my every need, but then is updating and keeping them up to date problematic? Should I install OpenGL and mesa from source, and leave the rest like Firefox to Pacman?

Why are you sure this makes the program faster? What needs do you have that are not met by using pacman? Is your current Arch Linux installation not fast enough?

Offline

#7 2014-06-20 20:27:39

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: [Solved] 'Best' way to install programs?

Just use pacman, that’s what you’re supposed to be doing. Compiling from source is more complicated and usually brings nothing significant in return.

It may however be useful to for example replace a GTK3 GUI with the GTK2 version in some applications that support both, but in this case you’d use abs to get the official PKGBUILD and then modify it to use gtk2, then build with makepkg, then install with pacman.

Offline

#8 2014-06-20 21:26:19

Proinsias
Member
From: Glasgow
Registered: 2013-08-19
Posts: 121

Re: [Solved] 'Best' way to install programs?

If you want to try compiling packages in the official repositories from source the Arch Build System makes it easy to do and pacman friendly:
https://wiki.archlinux.org/index.php/Abs#How_to_use_ABS

Offline

#9 2014-06-21 01:01:17

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,148

Re: [Solved] 'Best' way to install programs?

TeX is an exception. There are two good ways to install TeX Live. One is to use pacman. The other is to use the upstream installer. Neither involves compiling from source. Personally, I do not use Arch's packages for TeX Live. I use upstream's. However, unless you know you want to do this and why you want to do it, I'd recommend using pacman's packages. I was very clear about wanting to use upstream and very clear about why. For most people, pacman's packages are likely to be easier and equally satisfactory.

If you do install TeX Live from upstream, you will still be installing pre-compiled binaries but you will manage your installation using TeX Live's package manager rather than pacman. This works because the TL package manager installs in /usr/local/texlive and this is not a directory pacman ever concerns itself with.

Absolutely do not start compiling and installing random packages from source. As others have said, if you did do this, you should still use pacman. That's the point of having pacman - it manages packages so you don't have to.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#10 2014-06-21 12:03:13

Peilonrayz
Member
Registered: 2014-03-10
Posts: 3

Re: [Solved] 'Best' way to install programs?

Thank you for all the responses!

I didn't really know of PKGBUILD, apart from when getting things from AUR. So thank you for showing me this.
I was reinstalling Arch, so I thought `I might as well compile as it might make it faster right? And more customizable.`

drcouzelis wrote:

Wow, so many questions!

I'm a newb when it comes to Linux, so the bast way to learn is to ask a lot. And definitely look like an idiot when doing it.

There are two good ways to install TeX Live. One is to use pacman. The other is to use the upstream installer.

Can you please show me what you are referring to?

I didn't know about the TeX having it's own installer, it's just as I read this when I was installing it last time: `Installing TeX Live manually honors the Arch Way in that it gives you much more control and lets you understand the process.`
After being told about PKGBUILD, this makes much more sense as I read it as compile from source, rather then alternate ways like this.

Offline

#11 2014-06-21 13:50:29

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [Solved] 'Best' way to install programs?

Peilonrayz wrote:

I might as well compile as it might make it faster right?

Wrong.

Or more precisely: rarely, and even in the rare cases the benefits will be virtually unnoticable and would not come close to a saving of time to compensate for the amount of time spent compiling.

Making something "faster" is not a reason to recompile it yourself.  If you want to change some configure/build-time options, then that can be.

Use the right tool for the right job.  If you really want to compile everything from source, you'd likely be better served by using Gentoo - it's the right tool for that.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#12 2014-06-28 01:48:14

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,148

Re: [Solved] 'Best' way to install programs?

Peilonrayz wrote:

There are two good ways to install TeX Live. One is to use pacman. The other is to use the upstream installer.

Can you please show me what you are referring to?

I didn't know about the TeX having it's own installer, it's just as I read this when I was installing it last time: `Installing TeX Live manually honors the Arch Way in that it gives you much more control and lets you understand the process.`
After being told about PKGBUILD, this makes much more sense as I read it as compile from source, rather then alternate ways like this.

The 'install manually' is referring to using upstream's installer. It is not talking about compiling the binaries from source.

For details of the options offered by upstream, see http://www.tug.org/texlive/. If you have a reasonable network connection and are not planning to install on more than a couple of machines, the network installer is probably the best option. The 'quick installation' instructions are useful but you will want to refer to parts of the full installation documentation as well if doing this for the first time.

I recommend accepting upstream's defaults for the most part. In particular, I recommend using the 'full' installation scheme unless you are short of disk space.

I also recommend *not* installing as root. This is also in line with upstream's recommendation. What I did was create a new user and group (texlive:texlive). As root, I also created the directory /usr/local/texlive and made sure it was owned by the texlive user. Then I logged in as that user to install. This works well. Neither the installer nor later use of the utilities can touch your home directory or system files. There is no downside to this - it is no less convenient than having the installation owned by root. So you gain a security benefit for no cost. (Or minimal cost: you have to create a single user and group, make one new directory and chmod that directory appropriately.)

# adjust options as desired
useradd -d /usr/local/texlive -m -g texlive -r -s /bin/sh texlive

Set a password for the new account, and check ownership and permissions on the new directory:

drwxr-xr-x   7 texlive texlive 4.0K Meh  26 02:14 .

Then log in as texlive and install.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#13 2014-06-29 08:40:48

GSF1200S
Member
Registered: 2008-12-24
Posts: 474

Re: [Solved] 'Best' way to install programs?

There are a few cases where you might want to compile from source, but in all cases you should use a PKGBUILD to build it and pacman to install it.

For example, I use xfce4-terminal without window hints so it works with pytyle2. xfce4-terminal has no GUI option for this, so I use ABS to get the PKGBUILD, use

makepkg -o

to grab the source, and then make changes to the C file (where I eliminate window hints), then compile it using

makepkg -e

then install using (as root)

pacman -U <packagename>

Another time you might compile from source is for security purposes. If you use hardened-cc from the AUR, you can build packages full relro/canary/PIE. While I dont bother for everything, certain packages that could be a target or applications that stay open for a long time I build using hardened-cc. Basically just grab the PKGBUILD and

CC=/usr/bin/hgcc CXX=/usr/bin/hg++ makepkg -s

and again

pacman -U <packagename>

Likely a better choice for a "hardened" system would be Gentoo hardened since everything is built from source according to a hardened profile. Arch packages dont typically come with PIE or full-relro (the latter will likely never be mainstream); some exceptions are systemd and chromium for example.

Offline

#14 2014-06-29 09:08:59

mshan
Member
Registered: 2013-05-05
Posts: 105

Re: [Solved] 'Best' way to install programs?

the best way to install programs is using pacman.
no doubt it.


Amazing !

Offline

Board footer

Powered by FluxBB