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. |
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 |
Quote:
Code:
sudo apt-get "package name" Regards Marios |
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.
|
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 |
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.
|
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. |
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.
|
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. |
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.
|
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.)
|
Awesome, thank you :)
|
All times are GMT -5. The time now is 07:09 AM. |