sudo port selfupdate never succeeds - macports

I'm trying to do this:
sudo port install nautilus
but it tells me
Error: Port nautilus not found
despite nautilus being clearly on MacPorts: http://rsync.macports.org/nautilus/. So, I attempt to do this:
sudo port -d selfupdate
and I get this:
DEBUG: Copying /Users/BL185083/Library/Preferences/com.apple.dt.Xcode.plist to /opt/local/var/macports/home/Library/Preferences
DEBUG: MacPorts sources location: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs
---> Updating MacPorts base sources using rsync
rsync: failed to connect to rsync.macports.org: Operation timed out (60)
rsync error: error in socket IO (code 10) at /SourceCache/rsync/rsync-45/rsync/clientserver.c(105) [receiver=2.6.9]
Command failed: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/tarballs/base.tar /opt/local/var/macports/sources/rsync.macports.org/release/tarballs
Exit code: 10
DEBUG: Error synchronizing MacPorts sources: command execution failed
while executing
"macports::selfupdate [array get global_options] base_updated"
Error: Error synchronizing MacPorts sources: command execution failed
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: /opt/local/bin/port: port selfupdate failed: Error synchronizing MacPorts sources: command execution failed
And I checked to make sure my firewall was off:
So... Why can't I use MacPorts?

Related

Cannot instantiate qemu-kvm VM inside WSL2 (Windows Subsystem for Linux 2) on Windows 10

I am currently trying out the Windows Subsystem for Linux v2, on a Windows 10 Fast Ring build (Build 20161). More specifically, I am trying to run a qemu-kvm virtual machine using nested virtualization, but each attempt at creating a new VM using virt-manager ends up in failure.
I use Ubuntu 18.04 in my WSL2 instance, with a custom built kernel (that includes everything related to virtualization - please see this guide: https://boxofcables.dev/accelerated-kvm-guests-on-wsl-2/) and "nestedVirtualization" is set to "true" in my WSL config file. Even more so, "sudo kvm-ok" returns positive results when ran inside the Ubuntu instance.
I do have DBUS installed in Ubuntu WSL, and the service is running, so I believe this is not the source of the problem. I'm using VcXsrv for displaying X11 windows.
Here are the errors I get with each attempt:
Libvirtd.log
2020-07-07 03:33:24.507+0000: 1273: info : libvirt version: 4.0.0, package: 1ubuntu8.17 (Marc Deslauriers <marc.deslauriers#ubuntu.com> Wed, 06 May 2020 14:18:23 -0400)
2020-07-07 03:33:24.507+0000: 1273: info : hostname: LAPTOP-DRAGOS
2020-07-07 03:33:24.507+0000: 1273: error : udevGetDMIData:1818 : internal error: Failed to get udev device for syspath '/sys/devices/virtual/dmi/id' or '/sys/class/dmi/id'
2020-07-07 03:39:16.636+0000: 1261: error : virNetSocketNewConnectUNIX:715 : Failed to connect socket to '/var/run/libvirt/virtlogd-sock': No such file or directory
2020-07-07 03:39:29.617+0000: 1258: error : virNetSocketNewConnectUNIX:715 : Failed to connect socket to '/var/run/libvirt/virtlogd-sock': No such file or directory
2020-07-07 03:39:29.617+0000: 1258: error : virNetSocketNewConnectUNIX:715 : Failed to connect socket to '/var/run/libvirt/virtlogd-sock': No such file or directory
2020-07-07 04:01:14.141+0000: 1257: error : virKeepAliveTimerInternal:143 : internal error: connection closed due to keepalive timeout
Virt-manager GUI (when I click "Begin Installation" once all options have been set):
Unable to complete install: 'Failed to connect socket to '/var/run/libvirt/virtlogd-sock': No such file or directory'
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/create.py", line 2553, in _do_async_install
guest.start_install(meter=meter)
File "/usr/share/virt-manager/virtinst/guest.py", line 498, in start_install
doboot, transient)
File "/usr/share/virt-manager/virtinst/guest.py", line 434, in _create_guest
domain = self.conn.createXML(install_xml or final_xml, 0)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 3603, in createXML
if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirtError: Failed to connect socket to '/var/run/libvirt/virtlogd-sock': No such file or directory
What am I doing wrong?
Any input is highly appreciated! Thanks in advance!
UPDATE: As #FreeSoftwareServers suggested, I tried starting the virtlogd service. Since Ubuntu 18.04 does not use initd, I went for sudo service virtlogd start. And that got me over the initial error, but now I seem to encounter some permission issues, because I get the following:
Unable to complete install: 'internal error: process exited while connecting to monitor: Could not access KVM kernel module: Permission denied
2020-07-08T03:32:26.585442Z qemu-system-x86_64: failed to initialize KVM: Permission denied'
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/create.py", line 2553, in _do_async_install
guest.start_install(meter=meter)
File "/usr/share/virt-manager/virtinst/guest.py", line 498, in start_install
doboot, transient)
File "/usr/share/virt-manager/virtinst/guest.py", line 434, in _create_guest
domain = self.conn.createXML(install_xml or final_xml, 0)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 3603, in createXML
if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirtError: internal error: process exited while connecting to monitor: Could not access KVM kernel module: Permission denied
2020-07-08T03:32:26.585442Z qemu-system-x86_64: failed to initialize KVM: Permission denied
virt-manager GUI is run with sudo, so this permission denial message seems a bit puzzling.
Best regards,
Dragoș
On Windows 11, I got this working by fixing up /dev/kvm:
sudo chown root:kvm /dev/kvm
sudo chmod 660 /dev/kvm
Full setup:
# Install virt-manager
sudo apt install -y virt-manager
# Add youself to kvm and libvirt group
sudo usermod --append --groups kvm,libvirt "${USER}"
# Fix-up permission to avoid "Could not access KVM kernel module: Permission denied" error
sudo chown root:kvm /dev/kvm
sudo chmod 660 /dev/kvm
# Stat required services
sudo libvirtd &
sudo virtlogd &
# Launch virt-manager
virt-manager &

port install mpeg4ip project failure

I try to install mpeg4ip on macosx (Mojave) but failure:
sudo port install mpeg4ip
Error message:
---> Building db48
Error: Failed to build db48: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_distfiles.macports.org_ports_databases_db48/db48/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port mpeg4ip failed
Is this project (mpeg4ip) still active? If not, how can install it!

MongoDB, issues with configuring and starting

I am new to mongoDB and i am trying to get it configured and running on my Ubuntu server. When i go and enter this command in my terminal
sudo service mongod start
I get the following output
start: Job is already running: mongod
So, when i try to enter the shell with
mongo
I get the following output
2015-02-24T14:54:39.557-0800 warning: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2015-02-24T14:54:39.559-0800 Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146
I know I'm not working locally so I heard over to the mongod.conf file and change the following
port = 5000
# Listen to local interface only. Comment out to listen on all interfaces.
bind_ip = 10.0.1.51
Where bind_ip is now my ubuntu server and the port is 5000 as shown, so now i restart the service with
sudo service mongod restart
and outsputs
mongod start/running, process 1755
And now I try to renter back into shell with
mongo
and i still get the same error messages
MongoDB shell version: 2.6.7
connecting to: test
2015-02-24T15:01:26.229-0800 warning: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2015-02-24T15:01:26.230-0800 Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146
exception: connect failed
Can someone help me out with this issue? I've been going through the forums and nothing appears to be working. Thanks.
If anyone is having trouble, i looked into mongod --help and found the following solutions
mongod --smallfiles
or
mongod --nojournal
hope this helps anyone.

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.

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.

Resources