Why won't linux software supply binary edition? [closed]
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this questionSource files are good; RPM/DEB are easy to get; apt-get/yum are convenient.
But what can I do without the root privilege ? I cannot install them without sudo. I can not compile them due to the lack of library files.
Only a few open source tools supply binary editionss, which can be used directly after uncompress. But most are not. And the installation of many commercial software don't need the privilege of root, so there is a way to avoid such problem, right ?
So what is the reason preventing developers supplying a binary edition ? If the binary may be limited to specific platform due to updating libr开发者_StackOverflow社区ary files, can we just include all necessary files in the tar ?
Binary packages (deb/rpm) are designed keep you from dependency hell. Any package can get its dependencies from the package repositories. You only have one copy of everything.
Once you start sticking random binaries anywhere you have to keep track of all the dependencies. Things get messy.
Either you do have sudo privileges, in which case "sudo do_it_yourself" and it'll all be great, or someone else is managing your system for you, in which case it's their job to sudo install_stuff_for_me_please, so do that.
I could be wrong, but get the sense that your real frustration is not so much the lack of binary packages, but that the available binary packages require root to install (and the available source packages require library packages to compile which require root to install).
I believe that this is because the packages are by default intended to be installed for system-wide use, rather than installed within a user's home directory for private use by that specific user only.
Sometimes it may be possible to extract the package files (either using a dump option of the package tool or using some kind of fake root / chroot environment) and then relocate them to substitute locations ~/bin rather than /usr/bin etc) and get them to work.
Other times you may need to build the packages from source with a different install location specified in the pre-compile configuration. And to do that, you may need to learn to extract the library files and install them under your home directory rather than in system locations. It may prove easier to get the upstream source tarballs and build those rather than the customized source packages of your particular linux distribution - though you will have to sort out dependencies yourself.
Generally though, you seem to have discovered that linux distributions with nice packaging are oriented either towards single-user machines where the user can escalate to root when needed, or towards multi-user machines where all installation is provided by the sysadmin, but not towards the situation of a non-privileged user of a multi-user or organizationally-managed system who needs to install prebuilt software for individual use without sysadmin access or assistance.
An option that might be worth considering would be to see if you could install (/request installation of) virtual machine software, and then work within the virtual machine where you can have superuser capability. Another option might be to request a box on which to install a consumer distribution with no organizationally privileged capabilities - if IT is uneasy, perhaps without a network connection or behind a heavily filtered one.
You can compile with source file, and install them in your home, and run them from here. I fail to see how this is a programming related question
Actually, they do (for the most common platforms): the RPM,DEB and similar are usually compressed archives with the binaries (few things actually have to be compiled on install these days, as the package maintainers provide you with binaries), packed together with a script which does the install/uninstall maintenance tasks. Providing the packages actually makes it easier to install the programs in question, as 99% of the configuration is done for you, by the package itself.
That said, there are tools to extract the files from the packages - and you can then "install" the extracted files yourself. It is considerably more work, and the task of managing dependencies will be all yours (as opposed to "taken care of by the package management system"), but it may be a workable approach in cases you can't or won't use the packaging management.
(one reason to not distribute binaries: compatibility. Contrary to popular opinion, not every computer is a x86 PC, so it's easier to maintain the source code, and it gets compiled into whatever form the specific architecture needs)
Different linux distributives aren't fully binary compatible. Commercial software includes own versions of libraries, but it's usually overhead, because if its version is older then your system includes, this peace of software would be the only one using it (and every brick of software with its own version of library - is it really good?). Actually it's done while static linking is used. Without it there are hardly any chances that binary piece will be working in your system, and the more time will pass the less chances will be left.
Anyway you can download needed libraries, put them in your home-dir, compile your software pointing to those libraries and enjoy it without root privileges. You can create your complete "home" copy of "/usr/lib", "/usr/include", etc., say: "~/usr/lib", "~/usr/include"... and use it. Just little more configuring before compiling.
One can compile and use software without root on linux and unix systems. Set up a cross compile tool chain on another system to match your server's architecture using VMware or a live linux CDROM. Compile static binaries with no linked libraries. Some GCC arguments to use are -nostdlib -nodefaultlibs -lgcc -static
reference
Then log into your server and run mkdir ~/bin
. Download (ftp or email attachment) your statically complied program to ~/bin and then run: chmod +x
program name
You should now be able to run the program, but it may not be able to access other parts of the system.
精彩评论