How to configure MacPort to pick already installed packages - macos

I have recently shifted to OSX environment, so don't know much about MacPorts.
Is there a way to tell MacPorts to pick already installed packages. For instance to install
sudo port install meld
its requiring hell lot of packages, including python2.6. But I already have python2.6 installed.

No there isnt. If you want to link against system installations then use Homebrew or compile manually yourself. Personally i prefer Macports because its completely isolated. Ive got plenty of disk so having duplicates doesnt bother me.

Related

Class RunLoopModeTracker is implemented in both - Qt

Just to precise I'm a total beginner in this. I check on the internet and it seems that nothing match to this problem.
My goal is to run this github which is a facial recognition program: https://github.com/anisayari/easy_facial_recognition
So here is the error:
Class RunLoopModeTracker is implemented in both
/Users/pierre/anaconda3/lib/python3.7/site-packages/cv2/.dylibs/QtCore (0x1086267f0)
and /Users/pierre/anaconda3/lib/libQt5Core.5.9.7.dylib (0x122fc0a80).
One of the two will be used. Which one is undefined.
From what I understand, I just have to indicate which one to use but I don't find anything about how to do it. Also, It seems to be a recurrent error on Mac.
I had this error on my Mac too. Apparently opencv's GUI tools were conflicting with the PYQT libraries that were also installed on my system in my anaconda/lib/ folder. So to give opencv just one set of GUI tools and since I wasn't sure what else was using PYQT in my lib, I chose to use the non-GUI version of opencv, aka opencv-python-headless. I previously had opencv-python-headless installed on my system, and maybe the two packages can't co-exist in the new version of OpenCV or with Catalina.
I removed opencv-python
pip uninstall opencv-python
uninstalled and reinstalled the headless version (which has no GUI tools)
pip uninstall opencv-python-headless
pip install opencv-python-headless
I don't know if it was necessary to remove then reinstall the existing headless package, but that's what I did. I wasn't sure that opencv-headless would find the PYQT in my lib but it didn't have any problems.

How to downgrade zeromq from version 4.0.4 to 3.2.4

I Have installed zeromq 4.0.4 in my ubuntu machine.i have to downgrade my zmq to 3.2.4. i have tried sudo make uninstall , sudo make clean but none of them worked so far. and i also installed 3.2.4 from source. but still my system showing zmq version as 4.0.4. How can i get rid of old zmq files (Clean uninstall of 4.0.4)
Usually you can just use sudo make uninstall if the developer of the package has taken care of making an uninstall target. This is probably not the case for zeromq since you are asking (have not tried myself).
To avoid that kind of problems one way is to use checkinstall instead of make install whenever possible. It will create and install a deb file that can be uninstalled using apt.
make clean Is used to clean the temporary files before building, not to uninstall.
In your situation all you can do, I'm afraid, is to manually remove the files installed by zeromq.

I have apache2 installed twice, need to uninstall one

During my newbie phases I was not aware that Max OSX had appache2 installed by default.
I manually installed it and now I have two versions running and it's extremely confusing, because at times I don't know to which version my developments point to. As of now, I have two version in the following locations:
/etc/apache2/ (I believe is the default installation)
/opt/local/apache2 (I believe this is the one I manually installed)
How do I uninstall version 2 (the one I manually installed)?
Thanks!
Being that it's in /opt, the directory MacPorts uses, have you tried port uninstall apache2?

How to install macports openmpi on Mac osx 10.5.8?

I want the latest version of openmpi. I like to use macports because it is easy to install, uninstall, and upgrade software. I have installed the latest mpi via building from source, but no one seems to be able to get it to build properly with macports. There is always a build error. There are tickets (and you can see the logs at ), but they seem to be collecting dust and it seems strange that no one had found a solution.
I have tried uninstalling the built in version (I know, openmpi says not to do that--but it works fine if I reinstall it--even in a different directory), but I still the same build errors. I also tried with different gcc.
Does anyone know what is so difficult about getting openmpi via macports?
sudo port install openmpi
worked for me

Macports and Rubygems issues on Snow Leopard

I've installed Snow Leopard over Leopard with macports and rubygems already installed. This was regular install, not a clean "archive and erase" install.
It turned out, that SL has 64bit versions of shared libraries and many development utilities do not work. For example, "port" command complains on incompatible tcl library, or ruby cannot load 32bit bundles.
What is the easiest way to solve these issues?
I was googling for the answer for about 4 days already and finally came up with a step-by-step manual on fixing macports and rubygems:
http://oleganza.tumblr.com/post/127709563/snow-leopard-with-legacy-macports-and-rubygems
In short: for proper use of macports and rubygems you would have to:
Install trunk macports from source (or use 1.8 version when it is released)
Add alias for "gem install with 64bit architecture"
Reinstall all ports (not automated yet)
Reinstall all gems (100% automated)
This would take 10-20 minutes of your personal time and another 20
minutes of machine time in order to build and install stuff.
I would be glad to get more answers in order to fix other issues we might meet later.
Since it's really hard to force MacPorts to recompile all ports (in the proper order), I just did:
mv /opt /opt.old
Then install MacPorts 1.8, and bring back any configs you need from /opt.old/local/etc/
Otherwise, you'll get assorted errors complaining about your existing libs' architecture, (e.g. "Command output: ld: warning: in /opt/local/lib/libz.dylib, file is not of required architecture").
This isn't as clean as 'port uninstall installed' but works fast and good enough for me.
Richard Dooling's MacPorts On Snow Leopard explains that to fix the older install of MacPorts, which is broken after the upgrade to Snow Leopard, you should just download and install the new compatible version over the old one and then simply follow the migration instructions - which also say the same.

Resources