MacPorts selfupdate error: set_max_open_files: setrlimit failed: invalid argument - macports

I have recently re-installed MacPorts from the High Sierra install package. When for example run port selfupdate (or any other command) I get the following error:
set_max_open_files: setrlimit failed: invalid argument
while executing
"set_max_open_files"
(procedure "mportinit" line 41)
invoked from within
"mportinit ui_options global_options global_variations"
Error: /opt/local/bin/port: Failed to initialize MacPorts, set_max_open_files: setrlimit failed: invalid argument
Running in sudo everything works properly but if I recall correctly this was not necessary before I re-installed. I'm on OSX 10.13.3. I found no earlier reference to this problem and I was wondering if someone knows the reason for this?

Please see this page, you can update sudo to latest version 1.8.30.

Related

MacPorts failed install port

I have trouble installing PHP, MySQL and Apache2 using MacPorts. Currently my OS is Mavericks and i'm downloading the official binary package for mavericks (also tried compile from source and running selfupdate) but I got this error message:
---> Building readline
Error: org.macports.build for port readline returned: command execution failed
Error: Failed to install readline
Please see the log file for port readline for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_readline/readline/main.log
Error: The following dependencies were not installed: apache2 apr-util mysql5 readline tcp_wrappers sqlite3 libedit pcre bzip2 autoconf213 gawk xz m4 gsed libtool libxml2 mhash pkgconfig
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: Processing of port php5 failed
How can I solve this?
Thanks
Can you please check the error message block within the log file:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_readline/readline/main.log
Also make sure xcode command line tools are installed.
FYI: I faced similar error in Mavericks. My case was:
opt is a different partition which is mounted in /Volumes/opt
/opt is a symbolic link to /Volumes/opt.
It has been solved after editing /opt/local/etc/macports/macports.conf by replacing /opt with /Volumes/opt. Note sure this can help your case.

* ERROR: nrpe does not have a start function

I installed Nagios-NRPE on a Gentoo virtual machine.
When I tried to start nrpe using /etc/init.d/nrpe start I got the following error:
ERROR: nrpe does not have a start function.
However I do not get this error on other Gentoo virtual machines on which I have installed Nagios-NRPE.
What might be causing this error?
In my case it was a simple matter of installing openrc using emerge:
emerge -avq openrc
It seems that openrc provides a necessary service to interpret start for certain scripts including /etc/init.d/nrpe.

MacPorts: cgit install fails with "Unable to verify file checksums"

I tried to install cgit with MacPorts
# port install cgit
but it fails with:
Error: Checksum (md5) mismatch for cgit-0.8.2.1.tar.bz2
Error: Checksum (sha1) mismatch for cgit-0.8.2.1.tar.bz2
Error: Checksum (rmd160) mismatch for cgit-0.8.2.1.tar.bz2
Error: org.macports.checksum for port cgit returned:
Unable to verify file checksums
I'm running Snow Leopard, Mac OS X 10.6.8 (10K549), Kernel Version: Darwin 10.8.0 64-bit
already did some online search and successfully updated ports
# port selfupdate
# port upgrade outdated
but it didn't solved the problem.
I also don't know if I should file a bugreport at MacPorts (Mac newbie with Linux background here) so instead I used the occasion for my first stackoverflow question ;)
Help is appreciated,
Alex
It was a bug at MacPorts.
I reported it: http://trac.macports.org/ticket/36083 and they kindly fixed it by updating cgit to the latest version.
Thanks nobody (amusing username) for feedback and Ryan for fixing it.

port selfupdate: "macPorts sources: command execution failed"

I am trying to selfupdate my Macports, but I am getting the following message:
Error: /opt/local/bin/port: port selfupdate failed: Error synchronizing
MacPorts sources: command execution failed
I checked my /opt/local/bin/macports and the directory does not exist. Instead, it is in /opt/local/var. Could that be the issue?
Running with -dt, I get the following:
[Users/user] > selfupdate
DEBUG: MacPorts sources location: /opt/local/var/macports/sources/rsync.macports.org/release/base
---> Updating MacPorts base sources using rsync
rsync: failed to connect to rsync.macports.org: Connection refused (61)
rsync error: error in socket IO (code 10) at /SourceCache/rsync/rsync-42/rsync/clientserver.c(105) [receiver=2.6.9]
Command failed: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/base/ /opt/local/var/macports/sources/rsync.macports.org/release/base
Exit code: 10
DEBUG: Error synchronizing MacPorts sources: command execution failed
while executing
"macports::selfupdate [array get global_options] base_updated"
Error: /opt/local/bin/port: port selfupdate failed: Error synchronizing MacPorts sources: command execution failed
What is error 61? Any ideas how I can fix that?
I had this same problem recently, and I forgot to run the command under root. If anyone else is having the problem, be sure to run command as so:
sudo port selfupdate
I was behind a firewall. Tried on a different network and it worked.
There is no /opt/local/bin/macports. The executable you need is /opt/local/bin/port. (Port files are in /opt/local/var/..., which is correct.)
Based on the command execution failed:
you might have forgotten to run as root.
port forks the following programs: rsync, tclsh, openssl, tar, chmod, chown.
Are these executable and in the PATH? (Is /opt/local/bin in your PATH as well?)
If that doesn't help, run port with -dt to get all sorts of debug info. That might help with finding the problem. Append the interesting parts to your question, maybe.
I faced the same issue.But I used to this method in the after.
Go to:
$prefix/etc/macports/sources.conf
(my path is like this):
/opt/local/etc/macports/sources.conf
comment out the rsync entry, and add a new entry as follows:
#rsync://rsync.macports.org/release/tarballs/ports.tar [default]
https://distfiles.macports.org/ports.tar.gz [default]
After that you can run:
sudo port -d sync
It's also explained on MacPorts.com.
Update for Mavericks: to ensure the XCode command line tools are installed, open a terminal and run xcode-select –-install, then follow the instructions in the resulting pop-up window:
accept license
Of course, this is in addition to the other tips such as making sure to run sudo port selfupdate.
If anybody else is having this issue and they've recently updated XCode, the root of my problem was that Command Line Tools had been omitted from the latest build.
Opening XCode and installing Command Line Tools via the XCode preference panel fixed this error being thrown by MacPorts.
If your company block the access via rsync you can use the http tarball. Explained here
Hope this helps.
EDIT: Now prefer to use homebrew
I too had the same error. It is because the network connection is rejected. If you are using University/Company WiFi or public connection, firewall would be refusing the connection.
As you can see from the output of -dt "rsync: failed to connect to rsync.macports.org: Connection refused (61)"
There are workarounds available which are provided on the macports site:
1) Using svn.
2) If svn fails too, you can try using Daily tarball.
You can test the changes by running "sudo port -d sync"
Note: If the https fails, you can replace it with http. But doing so is not recommended, as you will be fetching from insecure connection.
I faced the same issue.
The main problem was my network. Because the NETWORK Port was blocked for;
rsync://rsync.macports.org/release/tarballs/ports.tar
Try to use use another network.
for someone who's problem still exists, maybe you've forgot agree the Xcode license:
# sudo xcodebuild license
remember to look through and type 'agree' in the end.
In my case, the problem was internal to Macports! I updated rsync (the one delivered by Apple is old) with Macports and then Macports failed to use it (/opt/local/bin/rsync) but asked instead to use /usr/bin/rsync which does not exist (or has been erased to force using Macports rsync ?). I created a soft link between the two and now it works again.

Cannot install YUM in MacOS

I'm trying to run the build script from HTML5 Boilerplate and I have to install YUM for that. I am on Mac OS Snow Leopard 10.6.8. When I did sudo port install yum, i'm getting the following error. Any idea how can I rectify it and install yum properly?
---> Computing dependencies for py24-nose
---> Dependencies to be installed: py24-distribute
---> Activating py24-distribute #0.6.24_0 Error: Target org.macports.activate returned: Image error:
/opt/local/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg-info
already exists and does not belong to a registered port. Unable to
activate port py24-distribute. Use 'port -f activate py24-distribute'
to force the activation. Error: Failed to install py24-distribute Log
for py24-distribute is at:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py-distribute/py24-distribute/main.log
Error: The following dependencies were not installed: py24-distribute
Error: Unable to upgrade port: 1 Error: Unable to execute port:
upgrade py24-nose failed To report a bug, see
<http://guide.macports.org/#project.tickets>
Previously after installing YUM, i was getting Segmentation Fault, so I uninstalled and installed it again using Macports to get the above error.
I think you've got the wrong end of the stick here. You do not need to install YUM on the Mac. In fact, that act is sheer madness, because you already have a perfectly good package manager in the shape of MacPorts!
Read again what it says
If you're on Mac or Linux...
You've got all your dependencies pre-installed, likely. You may need a yum install ant-contrib or what have you.
The key bit there is "or what have you". That is a cryptic way of saying "or the equivalent command for your package manager". On Red Hat-based systems, the package manager is indeed YUM; on Debian systems, it's APT; on the Mac, it's MacPorts.
So, remove your YUM installation, and simply do:
port install ant-contrib
You can now proceed to actually running Ant.

Resources