Which Linux software formats are compatible with Mac?

This is likely a schtooped question, but such things are my specialty ...


I have managed a "floortop" SUSE system and a "floortop" Redhat (both have *some* issues with drivers for my 22 in 1680x1050 LCD and grphics cards).


Both use RPM format for download.


Ubuntu uses deb.


All packages I have seen that self-install on Mac say "dmg".


Is there *any* crosscompatibility?


I want to download software that only has RPM nd DEB options.

MacBook Pro, Mac OS X (10.6.8)

Posted on Jul 27, 2011 7:19 PM

Reply
9 replies

Jul 27, 2011 8:15 PM in response to steve359

I don' think (not 100% sure) you can do this or if it even makes any sense for OS X. If this software is executable command line code (i.e, from the terminal), then unless it is Mach-o file format it can't be executed on OS X. If these are applications then they would need to be OS X bundle executables. I'm pretty sure you lose on both counts.

Jul 27, 2011 8:34 PM in response to steve359

There is no binary compatibility between the Mac OS and Linux, or any other OS for that matter (byte-compiled languages excepted.)


You can, of course, run a Linux distribution in a virtual machine. You can also boot Linux directly, though I wouldn't recommend it.


Most open-source applications written for Linux can be compiled from source to run on the Mac. You can either build them yourself (after installing Xcode) or use a package manager such as MacPorts.

Jul 27, 2011 8:54 PM in response to Linc Davis

Small surprise.


I moved away from self-managing Linux SUSE or RedHat because I do not need to be a system administrator. I figured I would lose some flexibility in the process.


At least my 1680x1050 display (with that niftly "^+two-finger-swipe" zooming capability) is "assumed and supported" now. Not to mention the four-finger side-swipe to bring up all open apps and the single finger moving. I hated and refused to use trackpads before this MBP.


Thanks to both responders.

Jul 27, 2011 9:01 PM in response to steve359

RPM and DEB packages are not a format for software so much as a container (like a ZIP file). Technically, they have three components: metadata, a cpio archive with the actual software files, and some install and uninstall scripts.


The DMG files for Macs are also a container, but of a different sort: they are disk images (a file representing a disk). The DMG contains either an application (Mac apps are actually a directory containing some metadata and the resources needed by the application), a package (which isn't that different than a DEB), or a metapackage (a package that contains multiple packages within it).


The RPM and DEB package systems could be installed on OS X, but it's a foreign concept, and in practice nobody ever creates OS X-compatible RPM packages. There's an OS X port of the Debian package management system called Fink, but you can't use Linux DEB packages. The binaries contained in existing RPM and DEB packages are written for a different operating system and in a different binary format - none of that Linux software contained in those packages will run on the OS X -- you'd need versions specifically compiled for OS X.


That said, there are two package management systems that are frequently used on Mac for open-source software (particularly that common in Linux). The first of these is MacPorts, which is based on the BSD Ports system (Gentoo Linux uses a similar system called Portage). MacPorts works similar to BSD ports and is essentially a system for downloading, building, and installing software and it's dependencies.


The other package management platform is Fink, which is based on Debian's package management system. It uses the deb package format and their own versions of the dpkg tools. Note that the fink packages are OS X-specific. You can't use Linux DEBs on OS X any more than you can use Fink DEBs on any version of Linux.


I should add that this form of package management is completely foreign to the basic OS X platform -- it's an addition for UNIX afficionados. Packages managed this way are kept completely separate from normal OS X software, don't follow the same application structure, etc.

Jul 27, 2011 9:12 PM in response to J D McIninch

That is a headache. Remarkably helpful, but a headache nonetheless.


MacPorts looks interesting, and may well be in my universe eventually.


But I am currently just trying to get Java development tools (both Oracle and outside-world) installed along with a non-enterprise version of a standard SQL DB (and eventually trying the "NoSQL" options).


I will just learn how to play by Apple's rules for the meantime.

Jul 28, 2011 11:04 AM in response to steve359

The Java SDK is already installed on your OS X system - unless you just purchased a Mac that comes with Lion pre-installed, in which case you need to download Java from the App Store first. Oracle doesn't currently make the OS X version available on their web-site. Apple is moving towards using OpenJDK and the OpenJDK team is still assimilating the OS X Java code that Apple has donated to them.


Other things, like Eclipse, are also available for download for OS X directly.


There are existing OS X packages for MySQL and PostgreSQL - no need to compile anything, just double-click on the package you download from the respective web-sites.

Jul 28, 2011 7:08 PM in response to J D McIninch

Already *somewhat* ahead of you.


JDeveloper downloaded as the "generic UNIX" package because all others were incomatiable, including the "bin" version.


Getting it to recognize the irregularly loaded JDK required reading an article (found through Oracle website help) that explained about placing a "ln -s" between the "Classes.jar" to an alias of "rt.jar".


OpenJDK will be a future concern, as I did get a functional connection for now.


Netbeans comes with its own JDK, as does WebLogic Server if you download the full-monty instead of the WebLogic installed inside JDeveloper.


The MySQL did install as downloaded (the dmg), but now need to access properly the "mysql" utility to grant DB rights to other users (easier on a box where the "mysql" account is not by default locked by the OS at install and sudo is not required).


Too much fun, this.


Too much admin, but better than fighting graphics card drivers.

Jul 28, 2011 8:38 PM in response to steve359

steve359 wrote:


----


---. ( OP refers to RedHat / Suse Linux )


Both use RPM format for download.


Ubuntu uses deb.


All packages I have seen that self-install on Mac say "dmg".


Is there *any* crosscompatibility?


I want to download software that only has RPM nd DEB options.

Hi


I think you are confusing yourself regarding these file-extensions. .. let me write you a little bit ( I use all these OS and think I know what you are interested in ) 😉


1st :


RPM and DEB both are file extensions for Linux package Managers.


To understand the behaviour of these filetypes you best think of "zip". rpm and deb are containg individual parts and folder, executables, manpages, scripts, icons etc . The package manager knows where to put them and what else must be installed in order for the binary inside the package to work once it has been installed.


PackageManagers are used to install software and the OS ( also all upgrades ) itself onto a Linux based operating system. It handles the initial installation as well as upgrading, uninstalling and solves conflicts on its own.


For example Ubuntu and Debian uses the APT package manager , most prominently known frontend is the "SynAPTics" program under Ubuntu. Apt can deal with *.deb packages.


Suse and Redhat ( and Mandriva and Fedora .. ) use various packagemanagers like YasT,Zypper and Yum . They all deal with *.rpm packages and these packages have exactly the same puropse like the *.deb packages in Debian/Ubuntu based Linux OS. For example the content of package "binutils" would be exactly the same - whether it comes as a debian or a redhat archive.


2nd :


To convert rpm to deb and vice versa a Linux user can launch the command "alien" ( for example to make a rpm of the package binutils.deb one would call the terminal and write alien binutils.deb and find then next to the original a binutils.rpm.


So "Alien" converts the content of the deb and rpm archives into a format the current Packagemanager can understand. Like I said - the contents are the same .


3rd :


The Mac OS X System, although its underpinnings are in fact based on FreeBSD ( is NOT Linux but original UNIX while Linux is a "clone" of UNIX ) does not use ANY package manager and does not understand *.deb or *.rpm.


THE MAX OS X programs file extension is *.APP which is unique. An app is simply a wrapper that contains everything the executable inside the wrapper needs to run on the specific OSX version.


Slightly Offtopic for *APP - History/Current : The only other System that has the same technique is "GNUSTEP" which derivated off of the opensources version of Mac OSX roots, namely "NEXTSTEP". Now GNUSTEP is no Operating System itself but only a runtime and development API to put on top of a other OS ( Windows, Linux ) GNUSTEP cannot execute *.APP written for OSX however because Aples copyrighted frameworks are missing of course on other OS. But one could develop Applications onto GNUSTEP that target both, GNUSTEP and OSX - therfore having the maximum in "CROSS_PLATFORM", an app that later runs on OSX and on Windows and Linux who both need to have the GNUSTEP runtime installed .. *sigh*



4: DEB/RPM opening in OSX :


If you have some sort of Unzipping/unraring apps installed they *might* be able to open these packages but the content would then just be unpacked/extracted and so far would not have any use.


5 : Running popular Linux software on OSX by using BSD ports / Macports :

if you want to use the majority of Linux Software you could install the ports system onto Mac OS X, which brings in a whole lotta choice of FreeBSD applications ( most Linux apps are available for BSD ).

Google MacPorts how to set that up.


6 : Using popular OpenSource Apps that require only the presence of X11 :


Linux has some outstanding good and free Apps that have made their way onto other systems. For isntance the "GIMP" -- to run these you wont have to tinker with Macports or the commandline to compile your own. SImply install from the Mac Install DIsk the package "X11 user" and find from the projects website the Mac OS Version. Some, not all OpenSource Apps need only that . Firefox Browser for Example does not, as it was made a Mac OS native application which uses what OSX provides to run.


7 : THE DMG file extensions on OSX :


A DMG ( DISK IMAGE ) is simply a virtual harddisk like a *.iso that you can mount with "virtual cd drives" in Windows or mount with Gnome's/KDE's iso-mounters under Linux. So DMG - Its a container that itself contains either installers or a ready to run *app ( known to be installed by simply dragging and dropping onto your Application folder ) .


This is used mainly to make sure that the contents are kept intact when a Macintosh Application is transfered over the internet and across different Operating Systems. Other OS like Windows could corrupt ressources inside an *.app - therfore it would not run once it has been first on WIndows and then on a Mac .. A zip file as "protector" around it would do the same, but a disk image is simple - once double clicked it gets mounted inside the file system of OSX - the classic Mac OS ( ver 7 to 9 ) already knew that technique and made use of it a lot. So it has found its way into the OSX also.

Jul 28, 2011 8:52 PM in response to Sjazbec

Very useful, that.


Was already familiar with the "package" concept of deb and rpm.


As much as I would like to be as familiar with these system issues as some (including you), I often find myself learning enough to get the software I need installed (via YasT and YUM which will check the numerous dependencies both for add and remove, and directly via RPM when you know depdencies are handled already).


Then sadly, I revert back to "stupid mode" and play with the new toys.


However, your tutorial brought up details I find quite interesting and well worth examination after I get past certain tasks required for my immediate software setup needs -- I *did* buy the MBP to have a stable OS in a quality laptop that runs large Java-interpreting packages like JDeveloper quickly, so must attend to certain details first.


I hope to have more intelligent question for you in a very short time.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Which Linux software formats are compatible with Mac?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.