C compiler cannot create executables - c

I installed OSx 1.6 and 1.7 (lion) today (1.5 was installed before). After this i reinstalled xcode and command line tools. Unistalled and cleand all ports from macport. When i try to install something from macports there is an error: (reinstalling xcode doesn't work)
---> Computing dependencies for autoconf
---> Dependencies to be installed: help2man gettext expat libiconv gperf ncurses ncursesw p5.12-locale-gettext perl5.12 gdbm m4 perl5
---> Configuring expat
Error: Target org.macports.configure returned: configure failure: shell command failed (see log for details)
Error: Failed to install expat
Log for expat is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_expat/expat/main.log
Error: The following dependencies were not installed: help2man gettext expat libiconv gperf ncurses ncursesw p5.12-locale-gettext perl5.12 gdbm m4 perl5
Error: Status 1 encountered during processing.
Install log:
cat /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_expat/expat/main.log
version:1
:debug:main Attempting ln -sf /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_expat/expat/work /opt/local/var/macports/sources/rsync.macports.org/release/ports/textproc/expat/work
:debug:main changing euid/egid - current euid: 0 - current egid: 0
:debug:main egid changed to: 500
:debug:main euid changed to: 501
:debug:main Executing org.macports.main (expat)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:archivefetch archivefetch phase started at Mon Feb 20 17:36:35 CET 2012
:msg:archivefetch ---> Fetching archive for expat
:debug:archivefetch Executing org.macports.archivefetch (expat)
:debug:archivefetch euid/egid changed to: 0/0
:debug:archivefetch chowned /opt/local/var/macports/software/expat to macports
:debug:archivefetch euid/egid changed to: 501/500
:debug:archivefetch euid/egid changed to: 0/0
:debug:archivefetch chowned /opt/local/var/macports/incoming to macports
:debug:archivefetch euid/egid changed to: 501/500
:info:archivefetch ---> expat-2.0.1_1.darwin_11.x86_64.tbz2 doesn't seem to exist in /opt/local/var/macports/software/expat
:msg:archivefetch ---> Attempting to fetch expat-2.0.1_1.darwin_11.x86_64.tbz2 from http://packages.macports.org/expat
:debug:archivefetch Fetching archive failed:: The requested URL returned error: 404
:debug:archivefetch Privilege de-escalation not attempted as not running as root.
:debug:fetch fetch phase started at Mon Feb 20 17:36:37 CET 2012
:notice:fetch ---> Fetching expat
:debug:fetch euid/egid changed to: 0/0
:debug:fetch chowned /opt/local/var/macports/distfiles/expat to macports
:debug:fetch euid/egid changed to: 501/500
:debug:fetch Executing org.macports.fetch (expat)
:debug:fetch Privilege de-escalation not attempted as not running as root.
:debug:checksum checksum phase started at Mon Feb 20 17:36:37 CET 2012
:notice:checksum ---> Verifying checksum(s) for expat
:debug:checksum Executing org.macports.checksum (expat)
:info:checksum ---> Checksumming expat-2.0.1.tar.gz
:debug:checksum Correct (md5) checksum for expat-2.0.1.tar.gz
:debug:checksum Correct (sha1) checksum for expat-2.0.1.tar.gz
:debug:checksum Correct (rmd160) checksum for expat-2.0.1.tar.gz
:debug:checksum Privilege de-escalation not attempted as not running as root.
:debug:extract extract phase started at Mon Feb 20 17:36:37 CET 2012
:notice:extract ---> Extracting expat
:debug:extract Executing org.macports.extract (expat)
:info:extract ---> Extracting expat-2.0.1.tar.gz
:debug:extract setting option extract.args to '/opt/local/var/macports/distfiles/expat/expat-2.0.1.tar.gz'
:debug:extract Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_expat/expat/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.7'
:debug:extract Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_expat/expat/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/expat/expat-2.0.1.tar.gz' | /usr/bin/gnutar --no-same-owner -xf -'
:debug:extract Executing command line: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_expat/expat/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/expat/expat-2.0.1.tar.gz' | /usr/bin/gnutar --no-same-owner -xf -
:debug:extract euid/egid changed to: 0/0
:debug:extract chowned /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_expat/expat/work to macports
:debug:extract euid/egid changed to: 501/500
:debug:extract Privilege de-escalation not attempted as not running as root.
:debug:patch patch phase started at Mon Feb 20 17:36:37 CET 2012
:debug:patch Executing org.macports.patch (expat)
:debug:patch Privilege de-escalation not attempted as not running as root.
:debug:configure configure phase started at Mon Feb 20 17:36:37 CET 2012
:notice:configure ---> Configuring expat
:debug:configure Using compiler 'Mac OS X clang'
:debug:configure Executing org.macports.configure (expat)
:debug:configure Environment: CPATH='/opt/local/include' CFLAGS='-pipe -O2 -arch x86_64' CPPFLAGS='-I/opt/local/include' CXXFLAGS='-pipe -O2 -arch x86_64' LIBRARY_PATH='/opt/local/lib' MACOSX_DEPLOYMENT_TARGET='10.7' CXX='/Applications/Xcode.app/Contents/Developer/usr/bin/llvm-g++-4.2' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_expat/expat/work/.CC_PRINT_OPTIONS' F90FLAGS='-pipe -O2 -m64' LDFLAGS='-L/opt/local/lib -arch x86_64' OBJC='/Applications/Xcode.app/Contents/Developer/usr/bin/clang' FCFLAGS='-pipe -O2 -m64' INSTALL='/usr/bin/install -c' OBJCFLAGS='-pipe -O2 -arch x86_64' FFLAGS='-pipe -O2 -m64' CC_PRINT_OPTIONS='YES' CC='/Applications/Xcode.app/Contents/Developer/usr/bin/clang'
:debug:configure Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_expat/expat/work/expat-2.0.1" && ./configure --prefix=/opt/local --mandir=/opt/local/share/man'
:debug:configure Executing command line: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_expat/expat/work/expat-2.0.1" && ./configure --prefix=/opt/local --mandir=/opt/local/share/man
:info:configure checking build system type... i386-apple-darwin11.3.0
:info:configure checking host system type... i386-apple-darwin11.3.0
:info:configure checking for gcc... /Applications/Xcode.app/Contents/Developer/usr/bin/clang
:info:configure checking for C compiler default output file name... configure: error: C compiler cannot create executables
:info:configure See `config.log' for more details.
:info:configure shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_expat/expat/work/expat-2.0.1" && ./configure --prefix=/opt/local --mandir=/opt/local/share/man " returned error 77
:error:configure Target org.macports.configure returned: configure failure: shell command failed (see log for details)
:debug:configure Backtrace: configure failure: shell command failed (see log for details)
while executing
"$procedure $targetname"
:info:configure Warning: the following items did not execute (for expat): org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install
:error:configure Failed to install expat
:debug:configure couldn't open "/System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/tclIndex": no such file or directory
while executing
"open [file join $dir tclIndex]"
i tried to run: sudo port -f install tcl +headers, error:
:info:configure checking for C compiler default output file name... configure: error: C compiler cannot create executables
:info:configure See `config.log' for more details.
:info:configure shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/tcl/work/tcl8.5.11/unix" && ./configure --prefix=/opt/local --mandir=/opt/local/share/man --disable-corefoundation tcl_cv_type_64bit="long long" " returned error 77
:error:configure Target org.macports.configure returned: configure failure: shell command failed (see log for details)
:debug:configure Backtrace: configure failure: shell command failed (see log for details)
while executing
"$procedure $targetname"
:info:configure Warning: the following items did not execute (for tcl): org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install
:notice:configure Log for tcl is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/tcl/main.log

Macports doesn't work with Xcode 4.3

The last lines of the log file say:
:debug:configure couldn't open "/System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/tclIndex": no such file or directory
while executing
"open [file join $dir tclIndex]"
It looks as if there is something up with your installation of Tcl/Tk - it doesn't match something's expectations. Either it isn't installed at all or it is the wrong version or ...
I suggest aiming to resolve that - or working out why $dir was set to /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/ before continuing.

Related

Laravel Homestead PHP Warning: PHP Startup: Unable to load dynamic library sqlsrv.so and pdo_sqlsrv.so

I have got to work on a Symfony v4.2, that connects to an external MS SQL Server database. The error I get is:
Attempted to call function "sqlsrv_configure" from the global
namespace.
I know there're already posts about it, but none focused on Laravel Homestead, that runs on Ubuntu 20.04.2.
I am running Homestead v12.3.1, Settler v11.3.0.
So far, I have understood that I should install both the sqlsrv and pdo_sqlsrv extensions.
I have just done that. In this case, given the fact that in Laravel Homestead there are several versions of PHP that you can switch:
$ sudo update-alternatives --config php:
There are 7 choices for the alternative php (providing /usr/bin/php).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/php8.0 80 auto mode
1 /usr/bin/php5.6 56 manual mode
* 2 /usr/bin/php7.0 70 manual mode
3 /usr/bin/php7.1 71 manual mode
4 /usr/bin/php7.2 72 manual mode
5 /usr/bin/php7.3 73 manual mode
6 /usr/bin/php7.4 74 manual mode
7 /usr/bin/php8.0 80 manual mode
As you can see, I am currently using the 7.0 ... it actually can be any.
What I did to install the extensions was to execute the following commands:
$ sudo apt-get install unixodbc-dev Reference
And the following, according to this other reference:
$ sudo pecl install sqlsrv
$ sudo pecl install pdo_sqlsrv
And the output was:
Build process completed successfully
Installing '/usr/lib/php/20200930/sqlsrv.so'
install ok: channel://pecl.php.net/sqlsrv-5.9.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=sqlsrv.so" to php.ini
Build process completed successfully
Installing '/usr/lib/php/20200930/pdo_sqlsrv.so'
install ok: channel://pecl.php.net/pdo_sqlsrv-5.9.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=pdo_sqlsrv.so" to php.ini
Indeed
$ ls -lah /usr/lib/php/20200930/
Those sqlsrv.ini and pdo_sqlsrv.ini do exist.
But then, when I searched for those recently installed extensions
$ php -m | grep sqlsrv
$ php -m | grep pdo_sqlsrv
the result was empty.
Then I restarted the php-fpm service like so:
$ sudo systemctl restart php7.0-fpm
$ php -m
But I got these warnings:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20200930/pdo_sqlsrv.so' - /usr/lib/php/20200930/pdo_sqlsrv.so: undefined symbol: zval_ptr_dtor in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20200930/sqlsrv.so' - /usr/lib/php/20200930/sqlsrv.so: undefined symbol: zval_ptr_dtor in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20200930/pdo_sqlsrv.so' - /usr/lib/php/20200930/pdo_sqlsrv.so: undefined symbol: zval_ptr_dtor in Unknown on line 0
Then I changed directory to
$ cd /etc/php/7.0/mods-available
and $ ls -lah
and edited both the
sqlsrv.ini
; priority=20
extension=/usr/lib/php/20200930/sqlsrv.so
pdo_sqlsrv.ini
; priority=30
extension=/usr/lib/php/20200930/pdo_sqlsrv.so
files.
And I get the same error.
Moreover, even if I change the files to:
sqlsrv.ini
; priority=20
extension=sqlsrv.so
pdo_sqlsrv.ini
; priority=30
extension=pdo_sqlsrv.so
Now I get an slightly different error in the directory:
$ php -m
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/pdo_sqlsrv.so' - /usr/lib/php/20151012/pdo_sqlsrv.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/sqlsrv.so' - /usr/lib/php/20151012/sqlsrv.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/pdo_sqlsrv.so' - /usr/lib/php/20151012/pdo_sqlsrv.so: cannot open shared object file: No such file or directory in Unknown on line 0
It looks like it simply can't load the libraries :(
According to this answer
$ find / -name 'sqlsrv' 2>&1 | grep -v 'Permission denied'
returns ( command reference ):
/usr/share/php/docs/sqlsrv
/var/lib/php/modules/7.1/cli/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.1/cgi/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.1/fpm/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.1/phpdbg/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.4/cli/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.4/cgi/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.4/fpm/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.4/phpdbg/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.3/cli/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.3/cgi/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.3/fpm/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.3/phpdbg/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.0/cli/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.0/cgi/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.0/fpm/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.0/phpdbg/enabled_by_admin/sqlsrv
/var/lib/php/modules/5.6/cli/enabled_by_admin/sqlsrv
/var/lib/php/modules/5.6/cgi/enabled_by_admin/sqlsrv
/var/lib/php/modules/5.6/fpm/enabled_by_admin/sqlsrv
/var/lib/php/modules/5.6/phpdbg/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.2/cli/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.2/cgi/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.2/fpm/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.2/phpdbg/enabled_by_admin/sqlsrv
/var/lib/php/modules/8.0/cli/enabled_by_admin/sqlsrv
/var/lib/php/modules/8.0/cgi/enabled_by_admin/sqlsrv
/var/lib/php/modules/8.0/fpm/enabled_by_admin/sqlsrv
/var/lib/php/modules/8.0/phpdbg/enabled_by_admin/sqlsrv
$ find / -name 'sqlsrv.so' 2>&1 | grep -v 'Permission denied'
/usr/lib/php/20200930/sqlsrv.so
$ find / -name 'pdo_sqlsrv.so' 2>&1 | grep -v 'Permission denied'
/usr/lib/php/20200930/pdo_sqlsrv.so
Another try I did was according to yet this another answer, where I executed:
$ pear config-set php_ini /etc/php/7.0/fpm/php.ini
And I got:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20200930/pdo_sqlsrv.so' - /usr/lib/php/20200930/pdo_sqlsrv.so: undefined symbol: zval_ptr_dtor in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20200930/sqlsrv.so' - /usr/lib/php/20200930/sqlsrv.so: undefined symbol: zval_ptr_dtor in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20200930/pdo_sqlsrv.so' - /usr/lib/php/20200930/pdo_sqlsrv.so: undefined symbol: zval_ptr_dtor in Unknown on line 0
config-set succeeded
But I still get the same warnings.
Here's a small explanation, and there but I don't get it :(
What else do I have to do to make PHP load those both sqlsrv.so and pdo_slqsrv.so extensions here on Laravel Homestead?
Are there any other alternatives where I can use a Symfony 4.2 app with the sqlsrv extension enabled? Maybe a virtual machine? Any ideas? Can anyone shed some good light to have this Symfony 4.2 app up and running and being able to connect with a 2017 MS SQL Server?

Problem installing/rebuilding Xdebug under Apple Silicon M1

Failing to install XDebug under the new Apple Silicon M1 under Big Sur - After using pecl install xdebug and running php --ini I am getting the following error:
PHP Warning: Failed loading Zend extension 'xdebug.so' (tried: /opt/homebrew/lib/php/pecl/20190902/xdebug.so (dlopen(/opt/homebrew/lib/php/pecl/20190902/xdebug.so, 9): no suitable image found. Did find:
/opt/homebrew/lib/php/pecl/20190902/xdebug.so: mach-o, but wrong architecture
/opt/homebrew/lib/php/pecl/20190902/xdebug.so: stat() failed with errno=22), /opt/homebrew/lib/php/pecl/20190902/xdebug.so.so (dlopen(/opt/homebrew/lib/php/pecl/20190902/xdebug.so.so, 9): image not found)) in Unknown on line 0
Warning: Failed loading Zend extension 'xdebug.so' (tried: /opt/homebrew/lib/php/pecl/20190902/xdebug.so (dlopen(/opt/homebrew/lib/php/pecl/20190902/xdebug.so, 9): no suitable image found. Did find:
/opt/homebrew/lib/php/pecl/20190902/xdebug.so: mach-o, but wrong architecture
/opt/homebrew/lib/php/pecl/20190902/xdebug.so: stat() failed with errno=22), /opt/homebrew/lib/php/pecl/20190902/xdebug.so.so (dlopen(/opt/homebrew/lib/php/pecl/20190902/xdebug.so.so, 9): image not found)) in Unknown on line 0
I tried recompiling xdebug from source (git clone git://github.com/xdebug/xdebug.git) with the same results. Can I force the correct architecture in the config.m4 when recompiling xdebug? - ANy other suggestions?
I needed to specify the architecture.
It worked with :
arch -arm64 sudo pecl install xdebug
tried install with pecl install xdebug and got this error:
Build process completed successfully
Installing '/opt/homebrew/Cellar/php#7.4/7.4.15_1/pecl/20190902/xdebug.so'
Warning: mkdir(): File exists in System.php on line 294
Warning: mkdir(): File exists in /opt/homebrew/Cellar/php#7.4/7.4.15_1/share/php#7.4/pear/System.php on line 294
ERROR: failed to mkdir /opt/homebrew/Cellar/php#7.4/7.4.15_1/pecl/20190902
I used fix from this link https://patriqueouimet.ca/tip/installing-php-and-pecl-extensions-on-macos and it helped
Your warnings are about architecture, maybe need to remove and install again - i was do all from arm64 terminal...
Simply open your php.ini file and replace this line:
zend_extension="xdebug.so"
with whatever the installation process offered you
in my case it's:
/opt/homebrew/Cellar/php/8.1.5/pecl/20210902/xdebug.so
And remember to restart your services!
On a fresh MacOS installation I was getting an error:
Warning: mkdir(): File exists in System.php on line 294 PHP Warning: mkdir(): File exists in /usr/local/Cellar/php/7.3.3/share/php/pear/System.php on line 294
Warning: mkdir(): File exists in /usr/local/Cellar/php/7.3.3/share/php/pear/System.php on line 294 ERROR: failed to mkdir /usr/local/Cellar/php/7.3.3/pecl/20180731
You simply need to make the directory the script cannot, to accomplish this, run the following:
pecl config-get ext_dir | pbcopy
mkdir -p {paste clipboard value}
Now you can install PECL extensions
pecl install xdebug
You will likely have to install Xdebug through PECL with:
arch -x86_64 sudo pecl install xdebug
Not sure if this was the problem. However, I did a full reset of my M1 Macbook. And this time I only used arm software (iterm, homebrew...), this time it installed without any issue.

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 &

sudo port selfupdate never succeeds

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?

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.

Resources