MacPorts setting an install as Active? - macports

I currently have the following MacPorts installed:
ImageMagick #6.6.4-9_0+q16
ImageMagick #6.6.5-0_0+q16 (active)
How do I set 6.6.4 as active?

You need to use the activate and deactivate commands. for example:
port deactivate ImageMagick#6.6.5-0_0+q16
port activate ImageMagick#6.6.4-9_0+q16
Note i may be wrong about the # syntax for the version... you may want to confirm that in the documentation.

Related

no redis function on phpinfo after install php redis with macPorts

i need help. currently i want to use PHP redis on my macOS from this repo https://github.com/phpredis/phpredis
because there are many error when i direct clone from that repository, i decided to choose install the phpredis use MacPorts.
my specification mac is
macOS Cataline v 10.15.7
PHP 7.3.11
i'm using XAMPP 7.4.12
after i install the macPorts i did run this command
sudo port install php73-redis
the installation was good and no error. after that i restart my apache and also restart my mac.. but when i check on phpinfo() no function redis..
i also check on my file /opt/local/var/db/php73/redis.ini also contain extension=redis.so
what is missing from my steps? i still not able to set the PHPredis after that. please help

ModuleNotFoundError in Spyder

I tried to import the biopython package in Spyder and got the error message:
ModuleNotFoundError: No module named 'biopython'
although biopython is installed.
I also checked the PYTHONPATH: there is a path set into the directory where the packages are stored.
Can somebody help? Did I miss something? Thanks for your help!
If you're using Anaconda, it's best to install all the packages you want from Anaconda if possible. You can check if a package is available with (e.g.):
conda search biopython
When I try that command it shows that biopython is available, so assuming you have access to the standard conda channels you should be able to get it this way.
Assuming you haven't already created a conda environment to work with, start by creating a new one with the packages you want to use:
conda create -n myenvname spyder biopython
where myenvname is the name you want to give the environment - call it whatever you like. If you want to use other packages as well, add their names to the end of this command. Then once the env is completed, activate it:
activate myenvname
or if this doesn't work, on Mac or Linux:
source activate myenvname
and start Spyder in this environment:
spyder
Each time you want to use this environment in future you will need to activate it first. You may also be able to do some of these tasks through the Anaconda Navigator or via Start menu shortcuts but the command line version will always work.
If there's a package you want that isn't available from conda but is available via pip, just use the pip command after creating and activating the environment.
If you are using Anaconda, a solution could be
conda install -c main biopython
following https://anaconda.org/main/biopython.
The official repository page helped me when I got your error message because numpy was not in place.

Opendaylight (odl) ovs-vsctl not found error

I am following this tutorial: https://wiki.opendaylight.org/view/Getting_started
I am trying to use the following code in opendaylight using karaf
ovs-vsctl show
But the command window says Command not found: ovs-vsctl
I have installed all the necessary libraries and the local host server (http://localhost:8181/dlux/index.html) is running fine. But somehow odl can't find ovs.
Can anyone tell me what's the error? I am running win 8.
Thank you
You need to run this command outside of karaf terminal.
Firstly, you should have ovs(Open Virtual Switch) or Mininet installed, and then create one or two open switches.
Basically, you started the SDN controller in karaf, and now in the step you are encountering problem, the switches need to be assigned ODL controller as their manager.
You must check also that ovsdb is already installed in karaf.
For that, try to execute the next command:
feature:list | grep ovsdb
That command will display all the ovsdb components/features that are available in your karaf distribution. The third column will indicate you if a given component is already installed or not (if you see an X, that means that the component is installed). If you want to install a component/feature:
feature:install <name_of_the_feature>
After that, try to execute it outside of karaf, as Sidhant01 has indicated you before.
Try to do it with sudo:
sudo ovs-vsctl show.
If you want to configure ovsdb in an active mode:
tools-vm:~$ sudo ovs-vsctl set-manager tcp:127.0.0.1:6640
tools-vm:~$ sudo ovs-vsctl show
98d8cf7a-44b1-4b02-a60c-7d832409d06f
Manager "tcp:127.0.0.1:6640"
is_connected: true
ovs_version: "2.0.2"
Cheers

Change apache mpm from event to prefork

I recently installed Apache/2.4.6 from source. At present the MPM module enabled is mpm_event_module. I want to enable the prefork mpm, but not sure from where to do that.
I am aware of changing the mpm module from /etc/sysconfig/httpd in case of the apache installed using yum. But in my case as the installinon is from source, I could not not do the same.
I tried recompiling apche using './configure --prefix=/usr/local/apache --enable-module=prefork' , but the mpm is still mpm_event_module. Clearly the issue is with defining prefork as the mpm.
I could also see that the installation directory has the prefork.c module. There must be a way to define it as the mpm.
Could someone please help.
In versions prior to 2.4, you cannot change the MPM of the binary Apache2 installation at run-time.
You have to compile Apache with the desired MPM using the --with-mpm=MODULE NAME command line option to the config script. To change MPM, the binary must be rebuilt.
You can determine which MPM Apache2 is currently built with by executing apache2 -l or httpd -l on the command line.
Brief but very clear documentation on this:
http://httpd.apache.org/docs/2.2/mpm.html
In version 2.4, you can also build MPMs as dynamic modules which allows changing the MPM at run-time.
http://httpd.apache.org/docs/2.4/mpm.html#dynamic

Trying to install MacPorts

I've followed the directions in Installing MacPorts.
To install MacPorts using the pkg installer. The installation apparently goes fine. For example, it goes through the multi-step process eventually saying "Installation Successful" or something to this effect.
And now there's just the "little" problem that neither of these commands work:
man ports
which ports
I've checked in /usr/local, /bin, and /usr/bin, and I don't see where this has been installed to. Ideas?
They're in /opt/local/bin, so as to not overwrite stuff that came with Mac OS X or that you might have gotten from elsewhere. They won't be in your $PATH until you close that Terminal and open another (nothing can alter the environment of a running program except the program itself).
It's in /opt/local/bin. MacPorts updates .bash_profile to include this in the path, but obviously existing shells don't see the updated PATH variable...
It's probably because you're trying ports but the command is called port: See http://guide.macports.org/#using.port

Resources