recentpopularlog in

kme : macports   53

#39084 (How to use clamav?) – MacPorts
No launchd script either, so you're on your own as far as scheduling 'freshclam's to run periodically.
macports  clamav  clamscan  freshclam  sysadmin  annoyance  needshelp 
27 days ago by kme
macos - Imagemagick convert command creating video from images gives avconv error on Mac - Stack Overflow
Find your delegates.xml file on your system. Mine (on my Mac Sierra) is at /usr/local/etc/ImageMagick-6/delegates.xml. But it could also be in /opt/local/etc/ImageMagick-6/delegates.xml. Mine shows
<code class="language-xml"><delegate encode="mpeg:encode" stealth="True" command="&quot;ffmpeg&quot; -nostdin -v -1 -i &quot;%M%%d.jpg&quot; &quot;%u.%m&quot; 2&gt; &quot;%u&quot;"/></code>
libav  ffmpeg  macports  macos  sierra  sortof  solution 
4 weeks ago by kme
#29763 (*_select framework does not apply to Perl: fix provided) – MacPorts
Status as of 06 December 2019:
You're not missing anything. It doesn't work yet. That's why this ticket is still open.
macports  perl  portselect  annoyance  needshelp 
11 weeks ago by kme
MacPorts - Developer - Re: Macports 2.0.3/Lion 10.7.2 Perl
As "man port" says, "Available select groups are installed as subdirectories of ${prefix}/etc/select/." So you can check that directory to see what things can be selected.
macports  interesting  alternatives  portselect 
11 weeks ago by kme
#53221 (perl_select not updated for Darwin 16) – MacPorts
My recollection is that perl_select has never been fully implemented and should not be used.

See also https://trac.macports.org/ticket/29763
macports  perl  portselect  annoyance  needshelp 
11 weeks ago by kme
Fixing SSL CA certificates with OpenSSL from MacPorts - andatche.com
MacPorts now offers a Methode that syncs certificates from the system keychain:
<code class="language-bash">sudo port install certsync
sudo port load certsync</code>
As for the missing dependency, consider filing a bug.
openssl  macports  macos  ca  cacert  certificate  curl  maybesolution 
september 2019 by kme
Install R with MacPorts – John Laudun
However, you run into dependency hell with 'libgcc'.

<code class="language-bash">port search --exact R</code>
mac  osx  macos  macports  r  sortof  solution 
july 2019 by kme
command line - Install shuf on OS X? - Ask Different
You can install coreutils with brew install coreutils.

shuf will be linked as gshuf. Read the caveats when you install coreutils.
coreutils  mac  osx  macos  macports  textprocessing  solution  likelinux 
april 2019 by kme
How do you run a perl script using a custom perl build from an AppleScript? | http://www.perlmonks.org/
The solution for me was to change the shebang line to use "#!/usr/bin/env perl"; totally worked when I got the error message

<code>$ ./saxon-lint.pl
dyld: lazy symbol binding failed: Symbol not found: _Perl_xs_handshake
Referenced from: /Users/kernst/perl5/lib/perl5/darwin-thread-multi-2level/auto/XML/LibXML/LibXML.bundle
Expected in: flat namespace

dyld: Symbol not found: _Perl_xs_handshake
Referenced from: /Users/kernst/perl5/lib/perl5/darwin-thread-multi-2level/auto/XML/LibXML/LibXML.bundle
Expected in: flat namespace

Trace/BPT trap: 5</code>

attempting to run saxon-lint with Perl 5.24 from MacPorts.
macports  perl  mac  osx  dyld  dynamicloader  errormessage  sortof  solution 
march 2018 by kme
Find a macports package given a file name - Stack Overflow | https://stackoverflow.com/
Unfortunately MacPorts currently (2.3.1) only supports that if you have the port installed, i.e. if you want to find out which port installed a file on your system. In this case, you can use port provides <filename>.

If you are looking for a port to install using an executable name, you're out of luck – MacPorts doesn't have the required databases to do that.

What I usually do instead is search for the file in a Linux distribution, e.g. using apt-file search <filename> on Debian. Given the Debian package name, I search for a similar MacPorts port.
mac  osx  macports  fuckina  packagemanagement  sysadmin  dammitbrain  solution 
september 2017 by kme
3.3. Common Tasks | https://guide.macports.org/
If you want to find all ports that depend on a given other port, you can use

$ port echo depends:<portname>

If you are only interested in the dependent ports that you actually have installed, you can use the quicker and more accurate dependents:

$ port dependents <portname>

$ port dependents libksba

gnupg2 depends on libksba
gpg-agent depends on libksba

MacPorts also has a recursive version of the dependents action called rdependents:

$ port rdependents libksba

The following ports are dependent on libksba:
gnupg2
gpgme
gpg-agent

Finally, to find out which port you manually installed caused the automatic installation of a dependency, use the following expression:

$ port installed requested and rdependentof:<portname>

$ port installed requested and rdependentof:libksba
mac  osx  packagemanagement  macports  dammitbrain  essential  sysadmin  reference 
september 2017 by kme
Bash Completion on OS X | Paul Peelen
Somehow this was already in my ~/.bash_profile, but a good reference regardless.
bashcompletion  autocomplete  bash  mac  osx  macports 
march 2017 by kme
version - How to: Macports select python - Stack Overflow [http://stackoverflow.com/]
First type port select --list python to list installed version, then just for example sudo port select --set python python27 to select 2.7. For more information type port help select.
macports  annoyance  python  mac  osx  solution  dammitbrain 
june 2016 by kme
composer-setup fails to check for required mbstring · Issue #4929 · composer/composer · GitHub


Thanks @alcohol. I should have said that my platform is Mac OS/X 10.10. I found the php.ini file, but couldn't easily find out (after brief web search) how to enable iconv. So, I guessed another solution, based on your suggestion, and recorded it below in case it helps anyone else.

I am using PHP7.0 from macports. The solution was to install two further ports:

$ port install php70-iconv
$ port install php70-openssl

Now the php composer.phar self-update succeeds :-) Thanks again for pointing me in the right direction.
errormessage  mac  osx  macports  composer  php  webdevel  solution 
may 2016 by kme
Installing Ansible on OS X - weluse GmbH - Blog
Steps I took were to install 'pip' from the source, using the 'get-pip.py --user' option described here (https://pip.pypa.io/en/latest/installing/#get-pip-py-options), and then added ~/Library/Python/2.7/bin to my PATH. After that, use 'pip install --user' for any other PyPA packages the you need to install.

Simply 'pip install ansible' within the virtualenv would probably have sufficed, since these instructions here are installing Ansible from the Git repo.

I also had to make sure that ~/Library/Python/2.7/bin was really, *really* at the beginning of my path, because some crazy scientific Python distribution had put the system python at the way beginning, *after* .bashrc was sourced in my .bash_profile. And because most OS X terminal apps seem to run as login shells (understandably, I guess, since .profile most likely isn't processed by the OS X login process).
mac  osx  ansible  installation  python  macports  solution 
april 2016 by kme
Install Ansible on Mac OSX
These instructions are okay, for 20-whatever when it was written. Nowadays, urllib3 throws some kind of security warning for the built-in Python 2.7.x that's shipped with OS X.

Steps I took were to install 'pip' from the source, using the '--user' option described here (https://pip.pypa.io/en/latest/installing/#get-pip-py-options), and then added ~/Library/Python/2.7/bin to my PATH. After that, use 'pip install --user' for any other PyPA packages the you need to install.
ansible  macports  mac  osx  installation  howto  maybesolution 
april 2016 by kme
Switching PHP version with MacPort - Stack Overflow


Maybe it's a good idea to ask port which post are available by invoking:

sudo port select --list php

Then you get a list of all the php versions port knows about

You can only do

sudo port select --set php <onOfTheList>

In my case, it was a python port, and port select --list python gave me a python26-apple. To get back to this known port, I had to enter

sudo port select --set python python27-apple

and this made the reverse.
mac  osx  macports  perl  php  cli  annoyance  dammitbrain  solution 
april 2016 by kme
#50711 (how to get perl5.18 installed) – MacPorts


sudo port install perl5 +perl5_18

will install what you want and make it the default perl.
mac  osx  perl  annoyance  anoyyyyyying  macports  solution 
march 2016 by kme
Portfile in trunk/dports/databases/openldap – MacPorts
Things I had to fix:

* According to https://trac.macports.org/attachment/ticket/23405/openldap.Portfile.trac23405_v1.diff, the OpenLDAP port should support a 'non_root' variant, but I can't see any evidence of that. Nonetheless, the default Portfile wants to run 'slapd' as the user 'ldap' (which is correctly created), but the post-install process didn't correctly give this 'ldap' user permissions to /opt/local/var/openldap-data.

- the solution here was to:


chown -R ldap:ldap /opt/local/var/openldap-data

# And so that it can read its own schemata and config files:
cd /opt/local/etc/openldap/
find . -type f -exec chgrp ldap {} \; -exec chmod g+r {} \;
find . -type d -exec chgrp ldap {} \; -exec chmod g+rx {} \;

then to create directories with appropriate permissions for the logs and the pidfile in /opt/local/var.

* My slapd.conf looks like this:


pidfile /opt/local/var/run/openldap/slapd.pid
argsfile /opt/local/var/run/openldap/slapd.args
logfile /opt/local/var/log/openldap/slapd.log
loglevel 256

* 'slapd' won't complain out loud about not being able to read its own configuration file unless you run it with '-d', say '-d 5'. It just dies, and the 'slapd.wrapper' stays running forever like a zombie. Running 'slapd -d 5 -u ldap <...>' was the only way I was able to figure all of this out.

* In order to rotate the logfiles created by 'slapd', I used the system-provided newsyslog.conf with instructions found here: http://serverfault.com/a/644768. My org.macports.slapd.conf looks like


# logfilename [owner:group] mode count size(KB) when flags [/pid_file] [sig_num]
#/opt/local/var/log/openldap/slapd.log ldap:ldap 644 2 2048 * G /opt/local/var/run/openldap/slapd.pid
/opt/local/var/log/openldap/slapd.log ldap:ldap 644 2 2048 * RG /opt/local/etc/LaunchDaemons/org.macports.slapd/slapd.wrapper restart


Unfortunately, slapd doesn't respond to user signals (it just dies), so you have to give newsyslog the 'R' flag option and use the MacPorts wrapper script to (hopefully) restart the daemon.
macports  ldap  openldap  sysadmin  configfile  mac  osx  solution 
february 2016 by kme
5.6. Tcl Extensions
I kept wondering what 'xinstall' was in the portfile for OpenLDAP, and this was the answer. A portfile is Tcl script, and 'xinstall' is a Tcl extension (like a function, I guess).

In any case, it didn't do what it was supposed to do, because the/opt/local/var/openldap-data directory wasn't owned by the 'ldap' user like it was a'sposed to be, and 'slapd' didn't even complain when run with the '-u ldap' option, it just died. Silently.
macports  tcl  sysadmin  openldap  solution 
february 2016 by kme
php - Remote debugging won't stop at breakpoints - Stack Overflow - http://stackoverflow.com/
I thought I had the same problem. The first problem was, I found that my php.ini was missing these two important settings:

xdebug.remote_autostart = "On"
xdebug.remote_enable = "On"
Then it worked perfectly.

The whole "Path Mapping" section under "Debug Configurations" in Eclipse doesn't seem to ever help me fix anything. I did notice that Eclipse/Xdebug sometime seem to completely ignore breakpoints in any file *other* than the one you specified in the "File' field of the "Server" tab. With "File" set to your "index.php" or whatever, and "Break at first line" also set, the first F8 after that usually seems to take you where you'd expect.

You can, of course, set it to break on the first line and then step through; that seems to work pretty consistently, as long as you didn't eff up the php.ini like I had.
php  xdebug  debugging  eclipse  annoyance  mac  osx  macports  webdevel  fuckina  solution 
february 2016 by kme
Installing PHP 5.4 (like a boss) with MacPorts – Scott Taylor - http://scotty-t.com/
Interestingly, it seems some ports come with launchd profiles:
You can start Apache and Memcached, et al by using commands like:

sudo port load apache2
sudo port unload apache2

sudo port load memcached
sudo port unload memcached

// memcached debugging, start with:
memcached -vv


What that actually does is 'sudo launchctl load -w /Library/LaunchDaemons/org.macports.${portname}.plist'. And Bob's your uncle.
php  macports  mac  osx  howto  webdevel  sysadmin  solution  launchd 
february 2016 by kme
subclipse: Wiki: JavaHL
Would be great, except it only gives you 1.9.x, and the version of Eclipse I'm using is too old for that version of JavaHL (apparently).
sudo port install subversion-javahlbindings +no_bdb +universal
sigh  java  subversion  mac  osx  macports  annoyance  errormessage  maybesolution 
february 2016 by kme
MacPorts Python installation on Mac - 10 easy steps
sudo port install py27-matplotlib py27-numpy py27-scipy py27-ipython
macports  mac  osx  python  packagemangement 
may 2015 by kme
How to get the size of the installed package via MacPort? - Stack Overflow [https://stackoverflow.com/]
port contents --size --units B guile | awk '{total += $1}; END{ printf("%0.2f KB\n", total/1024) }'
macports  sysadmin  mac  osx  solution 
february 2015 by kme
MacPorts - Users - how to remove distfiles etc. (short of disk space on a laptop)
For one: port clean –-all all

This released something like 5 gigs on the MacBook before even reaching the C's.

Other tips may have side effects as noted in the list replies.
macports  diskspace  maintenance  sysadmin  tipsandtricks  solution 
july 2014 by kme
#41488 (rbenv @0.4.0 fails to initialize shell completion) – MacPorts
eval "$(rbenv init -)" 2>&- . /opt/local/etc/bash_completion.d/rbenv
macports  solution  mac  osx  ruby  bash  bash_profile 
july 2014 by kme
osx - How can I clean up my MacPorts installation? - Super User
The suggestions you received cover what you're after:

port clean --all all
sudo port -f uninstall inactive

If you can't wait for the clean one to run in the background, there are a few commands you can run manually and faster.

Remove leftover build files (this is done automatically by default):

sudo rm -rf /opt/local/var/macports/build/*

Remove download files:

sudo rm -rf /opt/local/var/macports/distfiles/*

Remove archives (these aren't created by default):

sudo rm -rf /opt/local/var/macports/packages/*
macports  mac  osx  sysadmin  cleanup  crapcleaner  solution 
march 2013 by kme

Copy this bookmark:





to read