I am trying to use the ant rpm task to build a Linux installer on Mac OSX.
I installed MacPorts and compiled rpm which now works from the command line.
However, I would like it to work with ant (from inside Eclipse), but ant cannot find any rpm executable. In fact, whereis rpm does not find it either. Confused..
I also tried to create a separate rpm binary installer using macports (sudo port pkg rpm), but after installing that one nothing changed.
Where is the rpm binary?
MacPorts binaries can be found in /opt/local/bin.
According to the man page, whereis only searches directories contained in the user.cs_path sysctl variable (at least on OS X). This value defaults to /usr/bin:/bin:/usr/sbin:/sbin on my machine.
Related
I'm using "yum" which has a very old version of Ruby. I'm on linux OS and quite new to it. How can I install a specific version of Ruby that isn't present in the package installer?
Note: I don't have the other package managers (rbenv / rmv etc).
Note2: I am connected to this Linux machine via putty. So I only have command-line access.
Without package managers and using yum, your last option is to build from source.
Building from Source
Of course, you can install Ruby from source.
Download and unpack a tarball (EG: Ruby 3.0.2), then just do this:
$ ./configure
$ make
$ sudo make install
By default, this will install
Ruby into /usr/local. To change, pass the --prefix=DIR option to the
./configure script.
REF: https://www.ruby-lang.org/en/documentation/installation/#building-from-source
I'd like to download a different version of grep in Cygwin. Currently, I have version 2.21, but I'd like to get version 2.5.1 (this is what runs on Mac OS by default, and I'm more familiar with that).
I obviously don't want to run the entire setup again. Is there a way to get the Mac OS version (i.e. 2.5.1) without running setup all over again? Thanks. <3
Compiling is always a possible choice: grep lives here: ftp://ftp.gnu.org/gnu/grep/, and given the tarball (ftp://ftp.gnu.org/gnu/grep/grep-2.5.1.tar.gz),
tar xf 2.5.1.tar.gz
cd 2.5.1
./configure
make && make install
(this will probably install into /usr/local/bin — you should read the instructions, e.g., the --prefix option to suit your own needs).
That assumes you are developing, and have installed gcc (the Cygwin setup program helps in that case).
I installed Macport on my Mac for using RPM. After successful installation (I think), "rpmbuild" and "rpm" command is accessible. But rpmbuild always failed.
I checked "rpm --showrc" and noticed that there are a lot of macros are missing. For example, %__spec_prep_cmd, %__spec_prep_post, %__spec_prep_template. Therefore I have to define all these macros in /opt/local/lib/rpm/macros.
Can someone help me why is that? Do I miss some steps during Macport installation?
Here is my installation steps:
Download OS X 10.8 Mountain Lion version: MacPorts-2.3.1-10.8-MountainLion.pkg
sudo port -v selfupdate
port search rpm
port install rpm54
Edit the default macros file (likely in /opt/local/lib/rpm/macros)
to load (at least) macros.rpmbuild by uncommenting the line that
looks like:
...
#==============================================================================
# ---- rpmbuild macros.
#%%{load:%{_usrlibrpm}/macros.rpmbuild}
...
Remove the leading "#%"
I try to install scipy on my mac 10.6.8 but always have problem with it. I've installed ipython (sudo /usr/bin/easy_install-2.6 ipython) and numpy (python setup.py build/install), but when I installed scipy by the same way, I got always this error message:
RuntimeError: Running cythonize failed!
Could someone tell me how to solve this problem?
Have you tried using the binaries provided for OSX? That should ensure everything works.
EDIT
The easiest way I've found to keep package dependencies under control is to use MacPorts as much as possible because unlike Homebrew, the packages are designed to work together and dependencies are (almost always) automagically installed when you try to install something.
So, first, install MacPorts using the installer for Snow Leopard. Choose the option to install ports in a unique directory like /opt/local, so they don't conflict with whatever built-in versions the OS depends on. Also, ensure that /opt/local/bin and /opt/local/sbin are added to your $PATH before the system directories like /usr/bin, /bin, /sbin etc. so that when you run python from the command prompt you get the version you want. Your ~/.profile should have something like export PATH="/opt/local/bin:/opt/local/sbin:$PATH as its last line.
After MacPorts has been installed, you may want to restart just for fun to ensure that all of your environment variable are set up properly. Start Terminal.app (or your favorite replacement) and enter which port, which should return /opt/local/bin/port if everything worked correctly. Next, run sudo port selfupdate just to make sure everything is synced properly. Once that is done, we can install python and some modules. port allows you to pass a list of ports to be installed, so a command like sudo port install foo bar baz will install the latest versions of the foo, bar, and baz ports, along with any dependencies they may require, in the correct order. Some ports have binary distributions, and others are compiled as needed, so the first time you run it there may be a lot of dependencies to install. A nice feature of MacPorts is that you can have multiple versions of some packages installed at the same time, and you can switch between them if needed. Also, if port search is giving too many results, the online search engine can help you find what you're looking for.
To get a decent IPython-based Python 2 development environment going, you'll need the following:
python27
py27-ipython
py27-numpy
py27-scipy
py27-matplotlib (if you like drawing pretty pictures, but mainly so you can get pylab)
py27-pandas (DataFrames are your friend!)
and perhaps py27-pyqt4 if you run ipython via the qtconsole option
I'd also install py-pip and py27-distribute so you can install modules on your own if there is no MacPort version.
Finally, if you're a forward-looking person and want to use numpy et al. on Python 3, MacPorts has you covered! There are py32- and py33-based versions of all of the above packages except scipy, which is only py32 for now. However, I was able to install it just fine with pip, although I have a whole bunch of other devel tools on my machine, and I'm running 10.8.2, so YMMV.
Good luck!
I am trying to upload my app on Cydia and it requires .deb package. I am unable to figure out how to make .deb packages on mac. I am using 10.6.3 when I write this command on terminal
dpkg-deb -b MyProgram
Terminal output is
-bash: dpkg-deb: command not found
I've install fink, Mac ports insert Mac DVD to find out but nothing helps.
It's available on Homebrew:
brew install dpkg
If you don't have Homebrew installed, go to brew.sh. It's a simple one-liner to install.
Homebrew is less invasive, less complicated, and more popular than Macports or similar.
I installed mac ports 1.7 through terminal as no package is available.
After that I installed Mac ports 1.9 through installer.
Then goto this path /opt/local/bin and run sudo port selfupdate
after that execute sudo port install dpkg
it will take some time and after that your dpkg is successfully configured.
Run this command sudo dpkg-deb -b MyProgram to make MyProgram.deb
Note MyProgram should contain DEBIAN folder and under that control file remove txt extention
Below is control file
Website: www.zeeshanullah.com
Maintainer: zeeshanullah <zzeeshann#gmail.com>
Name: Snapture
Package: zeeshanullah
Section: zeeshanullah
Version: 2.x.x
Architecture: iphoneos-arm
Description: GPS joke.
Sponsor: zeeshanullah.com <zeeshanullah>
dont forget to place a new line at the end of control file otherwise you will get an error.
You need Xcode installed on your system before using mac ports - you find it on the second mac DVD, I think. After that, you can install mac ports and then via the Terminal type "sudo port install dpkg", press return and enter your password. It may take some time to compile. You tried that?
Best option is to use FPM and you can create it in 50 secs:
fpm
i think these links can be useful for you:
How to make a deb on mac
Using ant to create deb