LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-01-2020, 03:08 PM   #1
86153c1d-3ebd-4643-8885
Member
 
Registered: Feb 2020
Posts: 34

Rep: Reputation: 8
What is the safest way to install software that it is not on the main repository?


I wanted to know which is the safest way to install applications when this are not on the main repository, I mean safe in the sense of both not unintentionally installing malware and not damaging or creating conflicts within my OS.


I have read some people saying that SNAP could damage your system, others that .deb do, so I'm a bit confused since there are multiple opinions on the subject. Still, I guess that the best way is compiling from source, but if I can't do that, what's next?



I am using Debian 10.
 
Old 03-01-2020, 03:41 PM   #2
Hermani
Member
 
Registered: Apr 2018
Location: Delden, NL
Distribution: Ubuntu
Posts: 261
Blog Entries: 3

Rep: Reputation: 113Reputation: 113
Could you please tell us what software you'd like to install? And could you also mention the use case (server or desktop/laptop).

On my servers I mostly run my applications as Docker containers. They're quite well separated from the main OS. I am no real expert but I can manage them quite well.
 
Old 03-01-2020, 03:42 PM   #3
Lucifer53
LQ Newbie
 
Registered: Feb 2020
Posts: 10

Rep: Reputation: Disabled
I also suggest you that best way is compiling from source.If you don't do that then i think SNAP is best way.
 
Old 03-01-2020, 04:18 PM   #4
86153c1d-3ebd-4643-8885
Member
 
Registered: Feb 2020
Posts: 34

Original Poster
Rep: Reputation: 8
Quote:
Originally Posted by Hermani View Post
Could you please tell us what software you'd like to install? And could you also mention the use case (server or desktop/laptop).

On my servers I mostly run my applications as Docker containers. They're quite well separated from the main OS. I am no real expert but I can manage them quite well.

I am not refering to a particular software, just asking in general, because I want to try and install all software in the best way possible so I will not have future problems with my OS. I am running it on a desktop machine.


I don't know how to use Docker yet. :/
 
Old 03-01-2020, 04:19 PM   #5
86153c1d-3ebd-4643-8885
Member
 
Registered: Feb 2020
Posts: 34

Original Poster
Rep: Reputation: 8
Quote:
Originally Posted by Lucifer53 View Post
I also suggest you that best way is compiling from source.If you don't do that then i think SNAP is best way.

Mmm, okay, so the main idea is to try to avoid .deb whenever possible, right?
 
Old 03-01-2020, 04:28 PM   #6
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Bullseye
Posts: 1,508

Rep: Reputation: Disabled
Quote:
I am not refering to a particular software, just asking in general, because I want to try and install all software in the best way possible so I will not have future problems with my OS. I am running it on a desktop machine.
Quote:
Mmm, okay, so the main idea is to try to avoid .deb whenever possible, right?
Instead of trying to install random .deb packages you have downloaded, it is best practice to install software from the Debian repos.
Using the Debian package management tools ie: apt etc you won't run into problems.

Here is some suggested reading:

https://wiki.debian.org/PackageManagement

https://www.debian.org/doc/manuals/d...gtools.en.html

Last edited by the trooper; 03-01-2020 at 04:40 PM. Reason: typo
 
1 members found this post helpful.
Old 03-01-2020, 05:29 PM   #7
bazio101
Member
 
Registered: Feb 2020
Location: Greece
Distribution: Slackware
Posts: 32

Rep: Reputation: 15
What is the safest way to install software that it is not on the main repository?

Official repositories is always the safest choice.
Compiling source code is also safe. You can avoid damage and conflicts by using "/opt/<package_name" as prefix with "./configure" command or install and use "stow" to easily activate / deactivate packages.
 
Old 03-01-2020, 07:27 PM   #8
Mike_Walsh
Member
 
Registered: Jul 2017
Location: King's Lynn, UK
Distribution: Nowt but Puppies....
Posts: 660

Rep: Reputation: 362Reputation: 362Reputation: 362Reputation: 362
@ 86153c1d-3ebd-4643-8885:-

I would seriously consider trying out the AppImage format.

Although the stock answer in Linux is to always, always use the repositories, there's a growing trend developing for an equivalent to the 'Windows-PortableApps'. This is where Snaps, FlatPaks, AppImages, and the like are coming from.

I know the older Linux stalwarts will have my head in a vice for saying this, but due to the trend of more & more individuals growing disillusioned with Windows - especially given 10's predilection for 'data-harvesting' - there's an increasing number of folks looking for an alternative to the status quo.....and for many, Linux makes the most sense, especially since it's approaching nearly 3 decades in use.

For these individuals, they don't always want to have to learn totally new ways of doing things. They're used to just downloading things, and simply clicking on them to run 'em. Why should they have to be 'turned off' the idea of using Linux (or turned away), simply because we insist on sticking to 'tried & true' principles? Moreover, what's to stop some of us spreading our wings, and moving with the times? Must we remain stuck in the rut of doing things the same way, simply because that's the way we've always done them...?

Linux devs do go out of their way to come up with new ways of doing stuff. The least some of us can do is to give them a try.

Okay, I hear some of you say; he uses Puppy Linux, which marks him out as an IDIOT to start with, so we shouldn't take anything he says too seriously. Well, I've recently set up an install of the flagship Puppy, Bionicpup64, from scratch (which took around an hour and a half) and more than half of all my installed apps are running as AppImages, sym-linked in from a dedicated directory on an external partition.....a format which, I might add, works extremely well with Pup's admittedly 'odd' (to most of you) way of doing things. AppImages are intended to run in /tmp for the duration of a session, and with Puppy running in a 'temporary', virtual file-system in RAM anyway, it all gels rather nicely. It's also extremely quick (and easy) to 'update' an item when the time comes. Simply delete the old one, download & click-to-run the new one. Easy-peasy.

Admittedly, I'm talking about 'major' items, like the GIMP, and LibreOffice. These are available from the app's own official websites, and where not, usually from project pages on Github.....which I've never had any issues with, even since M$ bought them out.....

I just like AppImages. Personal choice.


Mike.

Last edited by Mike_Walsh; 03-01-2020 at 07:39 PM.
 
1 members found this post helpful.
Old 03-02-2020, 12:17 AM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
building from source is really the only way if you ARE NOT going to use the OS's repos

in your case i am GUESSING here -- one of the debian family of OS's

most programs are well documented on just how to build

However over the years i have found that "The Gimp" is the best and most documented and is very good for learning the basics

https://www.gimp.org/
https://www.gimp.org/source/

Google is your friend , USE IT

a link to the page that has the documentation
https://wiki.gimp.org/wiki/Hacking:Building

HOWEVER
It is way easier to run
Code:
apt-get update
apt-get install  gimp
BUT

building gimp and it's needed files will TEACH you how to do it
 
Old 03-02-2020, 01:09 AM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
@random-UUID:
There is no single correct answer here.
  • Containerised formats (snap, flatpak, maybe even docker) come with their own challenges and limitations.
  • “Random” .debs from the web might be designed for a different release of Debian or, worse, Ubuntu (edit: but they might just as well be perfectly suitable for your system)
  • ANY software could be bad/malware - even if you compile it yourself!
  • compiling yourself is harmless if tricky, but installing the result to your system might pose some challenges. In other words: make by all means, but think before you sudo make install. Many softwares can run locally from where you ‘make’d them (not installed)
In any case, multiple discrimination criteria need to be applied.

Last edited by ondoho; 03-03-2020 at 01:27 PM.
 
1 members found this post helpful.
Old 03-02-2020, 07:23 AM   #11
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Bullseye
Posts: 1,508

Rep: Reputation: Disabled
If you really must compile from source with Debian the following shows how to go about it the right way:

compile from source

Last edited by the trooper; 03-02-2020 at 07:25 AM.
 
Old 03-02-2020, 07:54 AM   #12
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,989

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
First install it in a container (like docker) or a VM, if possible. Or use a test host/OS just for that. But anyway, if you are unsure probably better to find another safer solution instead.
 
Old 03-02-2020, 08:01 AM   #13
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
source code from the one that wrote it.
./configure
make
make install

they are all done this way before being put into a package (deb, rpm, etc)
then you can use whatever distro you're using way of packaging the source code and put it into that format then install it if you please.
as far as "is it safe?"
you would have to either read through each line of code and find what you'd conciser safe or not before compiling and adding it into your system, or ask the developer the twenty questions game to try and determine if he or she is trustworthy, or search online to see if anyone else did that before you then posted about it.
or just install it and forget about the paranoia behind it.

Last edited by BW-userx; 03-02-2020 at 08:15 AM.
 
Old 03-02-2020, 08:17 AM   #14
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,246

Rep: Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323
I tend to do:

Code:
cd ~/.local/src
tar xf /path/to/tarball.tar.gz
./configure --prefix=$HOME/.local
make
make install
make clean
That installs the program into ~/.local, with the executables in ~/.local/bin and its other files (documentation, etc) in ~/.local/share. That's pretty safe.

Last edited by dugan; 03-02-2020 at 08:59 AM. Reason: Install to $HOME/.local not /usr
 
Old 03-02-2020, 08:36 AM   #15
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
doesn't
prefix=/usr -> /usr/bin
prefix=/usr/local -> /usr/local/bin

even though you're putting yours into a hidden dir in home. whereas depending on what distro one is using some do not even use /usr/local so (sometimes) I put my what I added from source into that so it keeps it separated.

I don't understand how using prefix=/usr gets it to install into a hidden dir in your home.

Last edited by BW-userx; 03-02-2020 at 08:39 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Install software from main repository server not mirror server dexper Linux - Software 2 09-09-2016 12:13 PM
Safest way to setup my Firewall, E-mail & Web Server matthew.collins Linux - Security 3 06-17-2004 05:38 PM
safest way to run apache PennyroyalFrog Linux - Newbie 7 06-05-2004 10:57 AM
Which is the safest way to convert ext2 > reiserfs? stelmed Slackware 5 02-27-2004 07:42 AM
Best/Safest way to link folders in VSFTPD webnoelle Linux - Security 3 01-03-2004 06:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration