LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-07-2013, 08:27 AM   #1
Driverman
LQ Newbie
 
Registered: Jun 2013
Posts: 7

Rep: Reputation: Disabled
Question about executables/binaries


When you download a package in a distribution like Ubuntu, that comes with binaries, right? In other words in most cases it doesn't compile source on the spot.

If that's correct, are the only requirements for running a binary on a given Linux system that the architecture of the binary match the system and that all required shared objects be available? I ask because at work, there are a few programs that I'd like to use on machines that I only have SSH access to which are not available on those systems. It also seems like the development toolchains are lacking, so I was hoping to build my binaries on my VM and then run them in userspace.
 
Old 06-07-2013, 04:24 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
on Ubuntu 12.10 you use apt-get package manager to install programs built fro that operating system from the software repositories

most times for most all everyday programs there is no need to build from source code
-- you "can" if you want to but it is WAY easier to use the package manager
 
Old 06-08-2013, 02:45 PM   #3
Gad
Member
 
Registered: May 2013
Distribution: FreeBSD
Posts: 566

Rep: Reputation: 114Reputation: 114
Quote:
Originally Posted by John VV View Post
on Ubuntu 12.10 you use apt-get package manager to install programs built fro that operating system from the software repositories

most times for most all everyday programs there is no need to build from source code
-- you "can" if you want to but it is WAY easier to use the package manager
Yes, you would normally use
Code:
sudo apt-get "package name"
(without the quotation marks)

Regards
Marios
 
Old 06-16-2013, 07:19 PM   #4
Driverman
LQ Newbie
 
Registered: Jun 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
Right, I use apt all of the time. I mean more like, let's say I have two different distros of Linux -- maybe Ubuntu and CentOS. Both are running on identical hardware with a 32 bit install. Let's say I download a prebuilt binary using package management on the Ubuntu box. Could I, in theory, copy all appropriate configs and shared object files that that binary file relies on to the CentOS box and run it? I know that'd be exceptionally messy, but I'd like to understand this.
 
Old 06-16-2013, 07:41 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Some things -- yes --
but for most things - about 99%+ NO

i reuse fonts and icons from fedora on my ScientificLinux6 and OpenSUSE 12.2 installs
and there are a few games that are in the fedora repos that will run on cent or opensuse
BUT these are all RPM based distros

for ubuntu ,which is moving away from the standard linux model , deb's to run on CentOS
you would be looking at fonts and icons mostly


every so often something might
one example ( on my set up ) is i have a rather large and COMPLEX group of programs called " ISIS3
-- from NASA/JPL and the USGS -- it is a type of GIS software .

it is built for RHEL6
it has NO problems running on OpenSUSE 12.2
but will NOT work on fedora 15,16,17,18

Last edited by John VV; 06-16-2013 at 07:43 PM.
 
Old 06-16-2013, 07:49 PM   #6
Driverman
LQ Newbie
 
Registered: Jun 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
I'm not talking about installing a .deb on CentOS. I'm talking about taking the actual executable file and running it in the manner in which I described.
 
Old 06-16-2013, 09:03 PM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,640
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
Offhand, I'd say that "it would be an 'interesting exercise' that 'might' work" ... but that, when you are maintaining a software system 'for a living,' you're really making things harder for yourself when you do such things. The problem is that there are many subtle dependencies between the thousands of software components in a system. (If you don't believe that, just try Gentoo, or Linux From Scratch!)

The packagers of "distros" endeavor to do all of that work, precisely so you don't have to. They also provide for ways to efficiently update a large number of servers without repeating the entire same update-procedures on every single one.

If you try instead to "ride the pony bareback," well, as I said, "it might work" ... but here's the rub ... "it might not work, and not-work in such a way that you do not know it." So, the justification for the business risk, IMHO, is simply not there.
 
Old 06-16-2013, 10:04 PM   #8
Driverman
LQ Newbie
 
Registered: Jun 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
I don't want to know if it would work so I could do it in a production system. I want to know if it would work in an effort to better understand the underlying structure of these systems in general.
 
Old 06-16-2013, 11:46 PM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,355

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
The key word in sundialsvcs's post is 'might'... There's no way to be sure without trying it.
As above, if you REALLY want to understand the deep details, try build/installing LFS or Gentoo or similar.
 
Old 06-17-2013, 06:41 AM   #10
Driverman
LQ Newbie
 
Registered: Jun 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
If it "might," what factors would potentially stop it from working? I've done LFS once, a long time ago, and yeah I imagine that I should do it again soon. I was just curious as to whether there were any obvious technical reasons why it wouldn't work.
 
Old 06-17-2013, 06:49 AM   #11
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,791

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
So if you have all the required shared objects and environment you will be able to run your app. If you have version mismatches or (similar) minor incompatibilities you might be able to run that app. Possibly you will get segmentation fault or other strange errors. (Otherwise you will not be able to do that.)
 
Old 06-17-2013, 06:59 AM   #12
Driverman
LQ Newbie
 
Registered: Jun 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
Awesome, thank you
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[dead question] Unstripped binaries? FeyFre Slackware 13 03-31-2012 07:53 AM
question about different checksum of binaries marozsas Linux - Security 8 08-23-2010 12:38 PM
I have a question about binary executables trist007 Linux - Newbie 7 06-28-2008 01:29 AM
question about installing binaries correctly jimjamjahaa Linux - Software 4 05-11-2006 02:09 AM
Question about Executables fotwoca Linux - Newbie 5 01-24-2002 05:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:18 AM.

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