MariaDB on Mac OS X Sierra via Homebrew - macos

After updating to Sierra, MariaDB would no long start on my system. As it did not contain critical data, I removed it and attempted to reinstall via homebrew, however the post-install fails and I am unable to run mysql_install_db manually either. Everything is up to date and I have tried multiple times.
I was able to start the service and even create a new database and user, but when trying to set the user password the database would crash saying that mysql.user was corrupt. Running optimize/analyze/repair didn't seem to do anything. Also not sure what was done differently to allow MariaDB to start that one time...
The common error seems to be mysqld got signal 4 which makes me think that there is an incompatibility between MariaDB and the gcc?
Any help greatly appreciated.
Install MariaDB
Fails to run the post-install step.
> brew install mariadb
==> Downloading https://homebrew.bintray.com/bottles/mariadb-10.1.18.sierra.bottle.tar.gz
Already downloaded: /Users/username/Library/Caches/Homebrew/mariadb-10.1.18.sierra.bottle.tar.gz
==> Pouring mariadb-10.1.18.sierra.bottle.tar.gz
==> Using the sandbox
==> /usr/local/Cellar/mariadb/10.1.18/bin/mysql_install_db --verbose --user=username --basedir=/usr/local/Cellar/mariadb/10.1.18 --datadir=/usr/local/var/mysql --tmpdir=/
Last 15 lines from /Users/username/Library/Logs/Homebrew/mariadb/post_install.01.mysql_install_db:
shell> /usr/local/Cellar/mariadb/10.1.18/bin/mysql -u root mysql
mysql> show tables;
Try 'mysqld --help' if you have problems with paths. Using
--general-log gives you a log in /usr/local/var/mysql that may be helpful.
The latest information about mysql_install_db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
MariaDB is hosted on launchpad; You can find the latest source and
email lists at http://launchpad.net/maria
Please check all of the above before submitting a bug report
at http://mariadb.org/jira
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall mariadb`
==> Caveats
A "/etc/my.cnf" from another install may interfere with a Homebrew-built
server starting up correctly.
To connect:
mysql -uroot
To have launchd start mariadb now and restart at login:
brew services start mariadb
Or, if you don't want/need a background service you can just run:
mysql.server start
==> Summary
🍺 /usr/local/Cellar/mariadb/10.1.18: 574 files, 136.6M
Run Post Install via Homebrew
> brew postinstall mariadb
==> Using the sandbox
==> /usr/local/Cellar/mariadb/10.1.18/bin/mysql_install_db --verbose --user=username --basedir=/usr/local/Cellar/mariadb/10.1.18 --datadir=/usr/local/var/mysql --tmpdir=/
Last 15 lines from /Users/username/Library/Logs/Homebrew/mariadb/post_install.01.mysql_install_db:
shell> /usr/local/Cellar/mariadb/10.1.18/bin/mysql -u root mysql
mysql> show tables;
Try 'mysqld --help' if you have problems with paths. Using
--general-log gives you a log in /usr/local/var/mysql that may be helpful.
The latest information about mysql_install_db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
MariaDB is hosted on launchpad; You can find the latest source and
email lists at http://launchpad.net/maria
Please check all of the above before submitting a bug report
at http://mariadb.org/jira
READ THIS: https://git.io/brew-troubleshooting
Manually run mysql_install_db
> mysql_install_db --general-log
Installing MariaDB/MySQL system tables in '/usr/local/var/mysql' ...
2016-11-07 10:56:36 140735707972544 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release.
2016-11-07 10:56:36 140735707972544 [Note] /usr/local/Cellar/mariadb/10.1.18/bin/mysqld (mysqld 10.1.18-MariaDB) starting as process 32902 ...
2016-11-07 10:56:36 7fff95e183c0 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2016-11-07 10:56:36 140735707972544 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-11-07 10:56:36 140735707972544 [Note] InnoDB: The InnoDB memory heap is disabled
2016-11-07 10:56:36 140735707972544 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-11-07 10:56:36 140735707972544 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2016-11-07 10:56:36 140735707972544 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-11-07 10:56:36 140735707972544 [Note] InnoDB: Using SSE crc32 instructions
2016-11-07 10:56:36 140735707972544 [Note] InnoDB: Initializing buffer pool, size = 2.0G
2016-11-07 10:56:37 140735707972544 [Note] InnoDB: Completed initialization of buffer pool
161107 10:56:37 [ERROR] mysqld got signal 4 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
To report this bug, see https://mariadb.com/kb/en/reporting-bugs
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
Server version: 10.1.18-MariaDB
key_buffer_size=33554432
read_buffer_size=2097152
max_used_connections=0
max_threads=102
thread_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1079322 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x0 thread_stack 0x3c000
0 mysqld 0x00000001076e62dc my_print_stacktrace + 60
0 mysqld 0x00000001071c6b4e handle_fatal_signal + 632
0 libsystem_platform.dylib 0x00007fff8d307bba _sigtramp + 26
0 libcrypto.1.0.0.dylib 0x000000010886cebb OPENSSL_ia32cap_P + 8019
0 libcrypto.1.0.0.dylib 0x000000010878456d ssleay_rand_bytes + 248
0 mysqld 0x00000001076f5200 my_random_bytes + 32
0 mysqld 0x00000001075b2790 _Z27fil_space_create_crypt_data16fil_encryption_tj + 184
0 mysqld 0x000000010769cda6 _Z34innobase_start_or_create_for_mysqlv + 4566
0 mysqld 0x00000001075f28aa _ZL13innobase_initPv + 3046
0 mysqld 0x00000001071c76de _Z24ha_initialize_handlertonP13st_plugin_int + 94
0 mysqld 0x000000010732dd19 _ZL17plugin_initializeP11st_mem_rootP13st_plugin_intPiPPcb + 351
0 mysqld 0x000000010732d9c9 _Z11plugin_initPiPPci + 2767
0 mysqld 0x0000000107270c0a _ZL22init_server_componentsv + 1807
0 mysqld 0x000000010726f017 _Z11mysqld_mainiPPc + 10571
0 libdyld.dylib 0x00007fff8d0fa255 start + 1
0 ??? 0x000000000000000a 0x0 + 10
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
Installation of system tables failed! Examine the logs in
/usr/local/var/mysql for more information.
The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:
shell> /usr/local/Cellar/mariadb/10.1.18/scripts/scripts/mysql_install_db --defaults-file=~/.my.cnf
You can also try to start the mysqld daemon with:
shell> /usr/local/Cellar/mariadb/10.1.18/bin/mysqld --skip-grant --general-log &
and use the command line tool /usr/local/Cellar/mariadb/10.1.18/bin/mysql
to connect to the mysql database and look at the grant tables:
shell> /usr/local/Cellar/mariadb/10.1.18/bin/mysql -u root mysql
mysql> show tables;
Try 'mysqld --help' if you have problems with paths. Using
--general-log gives you a log in /usr/local/var/mysql that may be helpful.
The latest information about mysql_install_db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
MariaDB is hosted on launchpad; You can find the latest source and
email lists at http://launchpad.net/maria
Please check all of the above before submitting a bug report
at http://mariadb.org/jira
Starting DB
> mysql.server start
Starting MySQL
.161107 10:58:10 mysqld_safe Logging to '/usr/local/var/mysql/MacBook-Pro.local.err'.
ERROR!
> cat MacBook-Pro.local.err
161107 10:59:15 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
2016-11-07 10:59:15 140735707972544 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release.
2016-11-07 10:59:15 140735707972544 [Note] /usr/local/Cellar/mariadb/10.1.18/bin/mysqld (mysqld 10.1.18-MariaDB) starting as process 33473 ...
2016-11-07 10:59:15 140735707972544 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
2016-11-07 10:59:15 140735707972544 [Note] Using unique option prefix 'myisam_recover' is error-prone and can break in the future. Please use the full name 'myisam-recover-options' instead.
2016-11-07 10:59:15 7fff95e183c0 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2016-11-07 10:59:15 140735707972544 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-11-07 10:59:15 140735707972544 [Note] InnoDB: The InnoDB memory heap is disabled
2016-11-07 10:59:15 140735707972544 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-11-07 10:59:15 140735707972544 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2016-11-07 10:59:15 140735707972544 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-11-07 10:59:15 140735707972544 [Note] InnoDB: Using SSE crc32 instructions
2016-11-07 10:59:15 140735707972544 [Note] InnoDB: Initializing buffer pool, size = 2.0G
2016-11-07 10:59:15 140735707972544 [Note] InnoDB: Completed initialization of buffer pool
2016-11-07 10:59:15 140735707972544 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2016-11-07 10:59:15 140735707972544 [Note] InnoDB: Setting file ./ibdata1 size to 10 MB
2016-11-07 10:59:15 140735707972544 [Note] InnoDB: Database physically writes the file full: wait...
161107 10:59:15 [ERROR] mysqld got signal 4 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
To report this bug, see https://mariadb.com/kb/en/reporting-bugs
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
Server version: 10.1.18-MariaDB
key_buffer_size=33554432
read_buffer_size=2097152
max_used_connections=0
max_threads=102
thread_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1079322 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x0 thread_stack 0x3c000
0 mysqld 0x000000010b9952dc my_print_stacktrace + 60
0 mysqld 0x000000010b475b4e handle_fatal_signal + 632
0 libsystem_platform.dylib 0x00007fff8d307bba _sigtramp + 26
0 ??? 0x000000010eb4ae0b 0x0 + 4541689355
0 libcrypto.1.0.0.dylib 0x000000010ca2d56d ssleay_rand_bytes + 248
0 mysqld 0x000000010b9a4200 my_random_bytes + 32
0 mysqld 0x000000010b861790 _Z27fil_space_create_crypt_data16fil_encryption_tj + 184
0 mysqld 0x000000010b94bda6 _Z34innobase_start_or_create_for_mysqlv + 4566
0 mysqld 0x000000010b8a18aa _ZL13innobase_initPv + 3046
0 mysqld 0x000000010b4766de _Z24ha_initialize_handlertonP13st_plugin_int + 94
0 mysqld 0x000000010b5dcd19 _ZL17plugin_initializeP11st_mem_rootP13st_plugin_intPiPPcb + 351
0 mysqld 0x000000010b5dc9c9 _Z11plugin_initPiPPci + 2767
0 mysqld 0x000000010b51fc0a _ZL22init_server_componentsv + 1807
0 mysqld 0x000000010b51e017 _Z11mysqld_mainiPPc + 10571
0 libdyld.dylib 0x00007fff8d0fa255 start + 1
0 ??? 0x0000000000000009 0x0 + 9
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
161107 10:59:16 mysqld_safe mysqld from pid file /usr/local/var/mysql/MacBook-Pro.local.pid ended
System Information
OSX
10.12.1
Homebrew
> brew -v
Homebrew 1.0.9
Homebrew/homebrew-core (git revision 3a20; last commit 2016-11-06)
> brew update
Already up-to-date.
> brew doctor
Your system is ready to brew.
GCC
> gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
MariaDB Uninstall
brew remove mariadb
rm -rf /usr/local/var/mysql
brew cleanup

In the long tradition of working on a problem for days and then fixing it right after posting a question... I was able to install MariaDB using Homebrew on OSX Sierra.
I was about to remove and reinstall XCode and the command line tools but for some reason decided to make sure that it was pointed to the correct path and ran:
sudo xcode-select --switch /Applications/Xcode.app
At the same time I zeroed in on the ssleay_rand_bytes and my_random_bytes part of the stacktrace and thought maybe openssl wasn't installed (it was) but then reinstalled it using homebrew. Then I decided to try one more time before killing XCode, and it worked...
openssl already installed
> brew install openssl
Warning: openssl-1.0.2j already installed
reinstall openssl
> brew reinstall openssl
==> Reinstalling openssl with --universal
==> Using the sandbox
==> Downloading https://www.openssl.org/source/openssl-1.0.2j.tar.gz
######################################################################## 100.0%
==> make clean
==> perl ./Configure --prefix=/usr/local/Cellar/openssl/1.0.2j --openssldir=/usr/local/etc/openssl no-ssl2 zlib-dynamic shared enable-cms darwin64-x86_64-cc enable-ec_nistp_6
==> make depend
==> make
xcode-select==> make test
==> make clean
==> perl ./Configure --prefix=/usr/local/Cellar/openssl/1.0.2j --openssldir=/usr/local/etc/openssl no-ssl2 zlib-dynamic shared enable-cms darwin-i386-cc
==> make depend
==> make
==> make test
==> make install MANDIR=/usr/local/Cellar/openssl/1.0.2j/share/man MANSUFFIX=ssl
==> lipo -create build-x86_64/libcrypto.1.0.0.dylib build-i386/libcrypto.1.0.0.dylib -output /usr/local/Cellar/openssl/1.0.2j/lib/libcrypto.1.0.0.dylib
==> lipo -create build-x86_64/libcrypto.a build-i386/libcrypto.a -output /usr/local/Cellar/openssl/1.0.2j/lib/libcrypto.a
==> lipo -create build-x86_64/libssl.1.0.0.dylib build-i386/libssl.1.0.0.dylib -output /usr/local/Cellar/openssl/1.0.2j/lib/libssl.1.0.0.dylib
==> lipo -create build-x86_64/libssl.a build-i386/libssl.a -output /usr/local/Cellar/openssl/1.0.2j/lib/libssl.a
==> lipo -create build-x86_64/engines/lib4758cca.dylib build-i386/engines/lib4758cca.dylib -output /usr/local/Cellar/openssl/1.0.2j/lib/engines/lib4758cca.dylib
==> lipo -create build-x86_64/engines/libaep.dylib build-i386/engines/libaep.dylib -output /usr/local/Cellar/openssl/1.0.2j/lib/engines/libaep.dylib
==> lipo -create build-x86_64/engines/libatalla.dylib build-i386/engines/libatalla.dylib -output /usr/local/Cellar/openssl/1.0.2j/lib/engines/libatalla.dylib
==> lipo -create build-x86_64/engines/libcapi.dylib build-i386/engines/libcapi.dylib -output /usr/local/Cellar/openssl/1.0.2j/lib/engines/libcapi.dylib
==> lipo -create build-x86_64/engines/libchil.dylib build-i386/engines/libchil.dylib -output /usr/local/Cellar/openssl/1.0.2j/lib/engines/libchil.dylib
==> lipo -create build-x86_64/engines/libcswift.dylib build-i386/engines/libcswift.dylib -output /usr/local/Cellar/openssl/1.0.2j/lib/engines/libcswift.dylib
==> lipo -create build-x86_64/engines/libgmp.dylib build-i386/engines/libgmp.dylib -output /usr/local/Cellar/openssl/1.0.2j/lib/engines/libgmp.dylib
==> lipo -create build-x86_64/engines/libgost.dylib build-i386/engines/libgost.dylib -output /usr/local/Cellar/openssl/1.0.2j/lib/engines/libgost.dylib
==> lipo -create build-x86_64/engines/libnuron.dylib build-i386/engines/libnuron.dylib -output /usr/local/Cellar/openssl/1.0.2j/lib/engines/libnuron.dylib
==> lipo -create build-x86_64/engines/libpadlock.dylib build-i386/engines/libpadlock.dylib -output /usr/local/Cellar/openssl/1.0.2j/lib/engines/libpadlock.dylib
==> lipo -create build-x86_64/engines/libsureware.dylib build-i386/engines/libsureware.dylib -output /usr/local/Cellar/openssl/1.0.2j/lib/engines/libsureware.dylib
==> lipo -create build-x86_64/engines/libubsec.dylib build-i386/engines/libubsec.dylib -output /usr/local/Cellar/openssl/1.0.2j/lib/engines/libubsec.dylib
==> lipo -create build-x86_64/openssl build-i386/openssl -output /usr/local/Cellar/openssl/1.0.2j/bin/openssl
==> Caveats
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
This formula is keg-only, which means it was not symlinked into /usr/local.
Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
==> Summary
🍺 /usr/local/Cellar/openssl/1.0.2j: 1,696 files, 17.3M, built in 11 minutes 1 second
install mariadb
> brew install mariadb
==> Downloading https://homebrew.bintray.com/bottles/mariadb-10.1.18.sierra.bottle.tar.gz
Already downloaded: /Users/username/Library/Caches/Homebrew/mariadb-10.1.18.sierra.bottle.tar.gz
==> Pouring mariadb-10.1.18.sierra.bottle.tar.gz
==> Using the sandbox
==> /usr/local/Cellar/mariadb/10.1.18/bin/mysql_install_db --verbose --user=username --basedir=/usr/local/Cellar/mariadb/10.1.18 --datadir=/usr/local/var/mysql --tmpdir=/
==> Caveats
A "/etc/my.cnf" from another install may interfere with a Homebrew-built
server starting up correctly.
To connect:
mysql -uroot
To have launchd start mariadb now and restart at login:
brew services start mariadb
Or, if you don't want/need a background service you can just run:
mysql.server start
==> Summary
🍺 /usr/local/Cellar/mariadb/10.1.18: 574 files, 136.6M
connect to mariadb
> mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.1.18-MariaDB Homebrew
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> exit
Bye

Related

E: Package 'linux-headers-4.15.0-29-generic' has no installation candidate

I am trying to set up VirtualBox on Ubuntu 18.04 but when I try to run it says:
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.15.0-29-generic) or it failed to
load. Please recompile the kernel module and install it by
sudo /sbin/vboxconfig
You will not be able to start VMs until this problem is fixed.
So I ran sudo /sbin/vboxconfig, for which I got the following error:
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
linux-headers-generic linux-headers-4.15.0-29-generic
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
linux-headers-generic linux-headers-4.15.0-29-generic
There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root. If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.
I tried to run sudo apt install linux-headers-generic linux-headers-4.15.0-29-generic but got the following error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package linux-headers-4.15.0-29-generic is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'linux-headers-4.15.0-29-generic' has no installation candidate
Update:
This is the output of running sudo apt install virtualbox-dkms dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
dkms is already the newest version (2.3-3ubuntu9).
dkms set to manually installed.
The following packages were automatically installed and are no longer required:
kbuild libsdl-ttf2.0-0 module-assistant
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
virtualbox virtualbox-qt
Suggested packages:
vde2 virtualbox-guest-additions-iso
The following packages will be REMOVED:
virtualbox-5.1
The following NEW packages will be installed:
virtualbox virtualbox-dkms virtualbox-qt
0 upgraded, 3 newly installed, 1 to remove and 3 not upgraded.
Need to get 0 B/26.3 MB of archives.
After this operation, 51.0 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 429944 files and directories currently installed.)
Removing virtualbox-5.1 (5.1.38-122592~Ubuntu~bionic) ...
Selecting previously unselected package virtualbox-dkms.
(Reading database ... 429153 files and directories currently installed.)
Preparing to unpack .../virtualbox-dkms_5.2.10-dfsg-6_all.deb ...
Unpacking virtualbox-dkms (5.2.10-dfsg-6) ...
Selecting previously unselected package virtualbox.
Preparing to unpack .../virtualbox_5.2.10-dfsg-6_amd64.deb ...
Unpacking virtualbox (5.2.10-dfsg-6) ...
Selecting previously unselected package virtualbox-qt.
Preparing to unpack .../virtualbox-qt_5.2.10-dfsg-6_amd64.deb ...
Unpacking virtualbox-qt (5.2.10-dfsg-6) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.1) ...
Setting up virtualbox-dkms (5.2.10-dfsg-6) ...
Loading new virtualbox-5.2.10 DKMS files...
Building for 4.15.0-29-generic
Module build for kernel 4.15.0-29-generic was skipped since the
kernel headers for this kernel does not seem to be installed.
Setting up virtualbox (5.2.10-dfsg-6) ...
vboxweb.service is a disabled or a static unit, not starting it.
Job for virtualbox.service failed because the control process exited with error code.
See "systemctl status virtualbox.service" and "journalctl -xe" for details.
invoke-rc.d: initscript virtualbox, action "restart" failed.
● virtualbox.service - LSB: VirtualBox Linux kernel module
Loaded: loaded (/etc/init.d/virtualbox; generated)
Active: failed (Result: exit-code) since Sun 2021-01-24 13:24:20 IST; 10ms ago
Docs: man:systemd-sysv-generator(8)
Process: 17173 ExecStart=/etc/init.d/virtualbox start (code=exited, status=1/FAILURE)
Jan 24 13:24:19 Tux systemd[1]: Starting LSB: VirtualBox Linux kernel module...
Jan 24 13:24:19 Tux virtualbox[17173]: * Loading VirtualBox kernel modules...
Jan 24 13:24:20 Tux virtualbox[17173]: * No suitable module for running kernel found
Jan 24 13:24:20 Tux virtualbox[17173]: ...fail!
Jan 24 13:24:20 Tux systemd[1]: virtualbox.service: Control process exited, code=exited status=1
Jan 24 13:24:20 Tux systemd[1]: virtualbox.service: Failed with result 'exit-code'.
Jan 24 13:24:20 Tux systemd[1]: Failed to start LSB: VirtualBox Linux kernel module.
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for systemd (237-3ubuntu10) ...
Processing triggers for man-db (2.8.3-2) ...
Processing triggers for shared-mime-info (1.9-2) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Setting up virtualbox-qt (5.2.10-dfsg-6) ...
Processing triggers for ureadahead (0.100.0-20) ...
I have turned secure boot off and turned on virtualisation in bios. I have also tried to install .deb package from virutalbox wesite but still getting this erro. A clean install of 20.04 is the only thing I have not done yet.
The issue was resolved after I installed Ubuntu 20.04.

Rust installation fails on Windows Subsystem for Linux: could not rename component file

I'm trying to install Rust on the Windows Subsystem for Linux (WSL) by running the following command which is provided officially here:
curl https://sh.rustup.rs -sSf | sh
I've installed Ubuntu from the Microsoft Store.
The problem is that the fails with 5 similar errors:
error: could not rename component file from '/home/thesdev/.rustup/tmp/glf5z1z643ehld0x_dir/bk' to '/home/thesdev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/man'
...
error: failed to install component: 'rust-docs-x86_64-unknown-linux-gnu', detected conflict: '"share/doc/rust/html"'
Screenshot is from VS Code. Trying it in the Ubuntu application results in the same errors.
Apparently, you need to close Visual Studio Code and run the command directly at the WSL prompt. The underlying issue is among the most-encountered WSL bugs:
npm package fails to install "npm ERR! Error: EACCES: permission denied"
Unable to save file when inotify is in use (using Node)
EACCES when renaming folder that is being watched from nodejs
I wouldn't be surprised if virus scanners could trigger this as well, not just Visual Studio Code.
After several failed installations with the same error, I had to nuke my .rustup directory. I then ran the Rust installer with sudo. I recommend also temporarily turning off your antivirus protection, as that seems to cause issues.
The entire sequence of commands:
$ sudo rm -rf ./home/<your_username>/.rustup
$ curl 'https://sh.rustup.rs' -sSf > rustinstall.sh
$ sudo ./rustinstall.sh -y
It seems that adding sudo to the start of the command does the trick.
Potential solution - disable your real-time antivirus protection during install
I had a very similar issue:
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2019-07-04, rust version 1.36.0 (a53f9df32 2019-07-03)
info: downloading component 'rustc'
91.1 MiB / 91.1 MiB (100 %) 777.6 KiB/s in 1m 30s ETA: 0s
info: downloading component 'rust-std'
61.3 MiB / 61.3 MiB (100 %) 269.1 KiB/s in 6m 2s ETA: 0s
info: downloading component 'cargo'
4.6 MiB / 4.6 MiB (100 %) 499.2 KiB/s in 10s ETA: 0s
info: downloading component 'rust-docs'
11.0 MiB / 11.0 MiB (100 %) 128.8 KiB/s in 1m 24s ETA: 0s
info: installing component 'rustc'
91.1 MiB / 91.1 MiB (100 %) 8.7 MiB/s in 9s ETA: 0s
info: installing component 'rust-std'
61.3 MiB / 61.3 MiB (100 %) 11.4 MiB/s in 5s ETA: 0s
info: installing component 'cargo'
info: installing component 'rust-docs'
11.0 MiB / 11.0 MiB (100 %) 537.6 KiB/s in 44s ETA: 0s
info: rolling back changes
error: could not rename component file from '/home/dg/.rustup/tmp/k_625bkits6oph6j_dir/rust-docs/share/doc/rust/html' to '/home/dg/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html'
info: caused by: Permission denied (os error 13)
I read this thread - Installing rust-docs component on Windows 10 is very slow about an issue with the unpacking of the documentation on windows. They mention the anti-virus contributes to issues with speed.
I turned off my anti-virus real-time protection and ran the install script again, this time with no issues.
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2019-07-04, rust version 1.36.0 (a53f9df32 2019-07-03)
info: downloading component 'rustc'
info: downloading component 'rust-std'
info: downloading component 'cargo'
info: downloading component 'rust-docs'
info: installing component 'rustc'
91.1 MiB / 91.1 MiB (100 %) 9.1 MiB/s in 8s ETA: 0s
info: installing component 'rust-std'
61.3 MiB / 61.3 MiB (100 %) 12.2 MiB/s in 5s ETA: 0s
info: installing component 'cargo'
info: installing component 'rust-docs'
11.0 MiB / 11.0 MiB (100 %) 299.2 KiB/s in 27s ETA: 0s
info: default toolchain set to 'stable'
stable installed - rustc 1.36.0 (a53f9df32 2019-07-03)
Rust is installed now. Great!
For anyone on WSL 2 try this:
export RUSTUP_IO_THREADS=1
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

gem install Errno::ENOLCK when installing gem

Whenever I try to install a gem with gem install [gem-name], I keep getting this error:
ERROR: While executing gem ... (Errno::ENOLCK)
No locks available # rb_file_flock - /home/abod/.gem/specs/api.rubygems.org%443/quick/Marshal.4.8/bundler-1.7.12.gemspec
I did gem install bundler just for illustration, but the Errno::ENOLCK will occur regardless of the gem I'm trying to install. I've searched around and can't seem to find anything about this error.
Here is the out put from gem env, in case that helps.
RubyGems Environment:
- RUBYGEMS VERSION: 2.4.5
- RUBY VERSION: 2.2.0 (2014-12-25 patchlevel 0) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/abod/.rvm/gems/ruby-2.2.0#global
- RUBY EXECUTABLE: /home/abod/.rvm/rubies/ruby-2.2.0/bin/ruby
- EXECUTABLE DIRECTORY: /home/abod/.rvm/gems/ruby-2.2.0#global/bin
- SPEC CACHE DIRECTORY: /home/abod/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /home/abod/.rvm/rubies/ruby-2.2.0/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/abod/.rvm/gems/ruby-2.2.0#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /home/abod/.rvm/gems/ruby-2.2.0#global/bin
- /home/abod/.rvm/rubies/ruby-2.2.0/bin
- /usr/local/bin
- /usr/bin
- /usr/local/sbin
- /usr/sbin
- /home/abod/.rvm/bin
- /home/abod/.rvm/bin
At the suggestion of #joelparkerhenderson, here are the output of some commands that may be helpful.
$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 2063389
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 32768
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 2063389
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
$ uname -a
Linux biohen36 3.14.23-100.fc19.x86_64 #1 SMP Thu Oct 30 18:36:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
$ stat /home/abod/.gem/specs/api.rubygems.org%443/quick/Marshal.4.8/bundler-1.7.12.gemspec
File: ‘/home/abod/.gem/specs/api.rubygems.org%443/quick/Marshal.4.8/bundler-1.7.12.gemspec’
Size: 1025 Blocks: 8 IO Block: 1048576 regular file
Device: 2fh/47d Inode: 2285894 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 730/ abod) Gid: ( 1013/ wommack)
Access: 2015-02-03 01:12:35.573192019 -0500
Modify: 2015-02-02 13:53:41.227813208 -0500
Change: 2015-02-02 13:53:41.227813208 -0500
Birth: -
$ fuser -m /home/abod/.gem/specs/api.rubygems.org%443/quick/Marshal.4.8/bundler-1.7.12.gemspec
/home/abod/.gem/specs/api.rubygems.org%443/quick/Marshal.4.8/bundler-1.7.12.gemspec: 57788c
There were more processes accessing the file, but I killed them and tried to install again, but I still got the lock error. I'm not out of disk space either.
Here is some more info:
This is on a compute cluster. The home directory /home/abod is symlinked somewhere on /mnt which mounts to some other machine on the network.
The output from mount has been requested by a few commenters. Here are the lines regarding the home directory:
fileserver:/homes on /home type nfs (rw,noatime,nodiratime,vers=3,rsize=1048576,wsize=1048576,namlen=255,soft,nocto,noacl,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=128.175.xxx.xxx,mountvers=3,mountport=20048,mountproto=udp,local_lock=none,addr=128.175.xxx.xxx)
-hosts on /net/fileserver/homes type autofs (rw,relatime,fd=13,pgrp=1368,timeout=300,minproto=5,maxproto=5,offset)
fileserver:/homes on /net/fileserver/homes type nfs (rw,nosuid,nodev,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=128.175.xxx.xxx,mountvers=3,mountport=20048,mountproto=udp,local_lock=none,addr=128.175.xxx.xxx)
Edit
I found this ticket on the rubygems github page that is related to my issue: https://github.com/rubygems/rubygems/issues/1176
Note: I'm offering a bounty to help the OP, because we need more expert help.
Here are some general ideas to get you started...
Is it possible that you're out of system resources, such as disk space?
Or your system is limiting the resources you can use?
Or trying to write to a volume where you don't have permissions or a lock daemon?
If no one has a better answer for you, by the time you read this, can you try running these commands then post the output in your question?
$ df
$ ulimit -a
$ uname -a
$ stat /home/abod/.gem/specs/api.rubygems.org%443/quick/Marshal.4.8/bundler-1.7.12.gemspec
$ fuser -m /home/abod/.gem/specs/api.rubygems.org%443/quick/Marshal.4.8/bundler-1.7.12.gemspec
If you want to kill any process accessing that file, that may be holding locks:
$ fuser --kill /home/abod/.gem/specs/api.rubygems.org%443/quick/Marshal.4.8/bundler-1.7.12.gemspec
You can discover if the issue is with Ruby vs. gem by running this:
path = "/home/abod/.gem/specs/api.rubygems.org%443/quick/Marshal.4.8/bundler-1.7.12.gemspec"
f = File.open(path, File::RDWR|File::CREAT, 0644){|f|
f.flock(File::LOCK_EX)
f.flock(File::LOCK_UN)
}
If the above code fails, then the most likely explanation is that you're using a filesystem that doesn't support file locking. This would be consistent with your home directory being mounted to some other filesystem, such as using NFS without a lock daemon.
Edit: OP writes:
Running the code you suggest: test.rb:4:in flock': No locks available # rb_file_flock - /home/abod/.gem/specs/api.rubygems.org%443/quick/Marshal.4.8/bundler-1.7.12.gems‌​pec (Errno::ENOLCK) from test.rb:4:inblock in ' from test.rb:3:in open' from test.rb:3:in'
That looks to me like your filesystem doesn't provide locking.
I have two suggestions and I'm also adding a bounty to your question to help attract expert attention.
If you have any filesystem space on that computer that isn't a mounted compute cluster, try installing a gem there. You can set the GEM_HOME environment variable like this:
GEM_HOME=/foo/bar gem install <name>
If you can use a similar system, such as the same OS on VirtualBox or VMWare, then you can use the bundler gem, a Gemfile, and the command bundle pack. This creates a directory full of the gems listed in the Gemfile. You can then copy this directory anywhere you want, for example by using rsync, or scp, or sftp, etc. (This doesn't help much though with native gems, such as pg for PostgreSQL - you would need to be sure to install all the PostgresSQL dependencies and headers on your own).
Ask your Sys Admin to unmount and mount the partition; the NFS Lock Daemon messes up at times and this will reset it.
(Not exactly an elegant or long-term solution, I know).

Can't update Macports (with Mac OS X Mavericks)

After upgrading Mac OS X to newest version Mavericks, I attempted to selfupdate my Macports, but it failed:
$ sudo port -v selfupdate
---> Updating MacPorts base sources using rsync
receiving file list ... done
sent 36 bytes received 69 bytes 210.00 bytes/sec
total size is 4925440 speedup is 46908.95
receiving file list ... done
sent 36 bytes received 76 bytes 74.67 bytes/sec
total size is 512 speedup is 4.57
MacPorts base version 2.2.0 installed,
MacPorts base version 2.2.1 downloaded.
---> Updating the ports tree
Synchronizing local ports tree from rsync://rsync.macports.org/release/tarballs/ports.tar
receiving file list ... done
sent 36 bytes received 70 bytes 70.67 bytes/sec
total size is 57702400 speedup is 544362.26
receiving file list ... done
sent 36 bytes received 77 bytes 75.33 bytes/sec
total size is 512 speedup is 4.53
receiving file list ... rsync: change_dir "tarballs/PortIndex_darwin_13_i386" (in release) failed: No such file or directory (2)
done
sent 4 bytes received 9 bytes 26.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(1400) [receiver=2.6.9]
Command failed: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/tarballs/PortIndex_darwin_13_i386/PortIndex /opt/local/var/macports/sources/rsync.macports.org/release/tarballs
Exit code: 23
---> MacPorts base is outdated, installing new version 2.2.1
Installing new MacPorts release in /opt/local as root:admin; permissions 0755; Tcl-Package in /Library/Tcl
checking build system type... x86_64-apple-darwin13.0.0
checking host system type... x86_64-apple-darwin13.0.0
checking target system type... x86_64-apple-darwin13.0.0
checking MacPorts version... 2.2.1
checking for sw_vers... /usr/bin/sw_vers
checking for defaults... /usr/bin/defaults
checking for xcode-select... /usr/bin/xcode-select
checking Mac OS X version... 10.9
checking Xcode location... /Applications/Xcode.app/Contents/Developer
checking Xcode version... 5.0.1
checking for gcc... /usr/bin/cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
<snip>
checking CommonCrypto/CommonDigest.h presence... yes
checking for CommonCrypto/CommonDigest.h... yes
checking for readline in -lreadline... yes
checking whether rl_username_completion_function is declared... no
checking whether rl_filename_completion_function is declared... yes
checking whether rl_completion_matches is declared... yes
checking whether username_completion_function is declared... yes
checking whether filename_completion_function is declared... yes
checking whether completion_matches is declared... yes
checking for Tcl configuration... configure: error: Can't find Tcl configuration definitions
Command failed: cd /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/base && CC=/usr/bin/cc OBJC=/usr/bin/cc ./configure --prefix=/opt/local --with-tclpackage=/Library/Tcl --with-install-user=root --with-install-group=admin --with-directory-mode=0755 --enable-readline && make SELFUPDATING=1 && make install SELFUPDATING=1
Exit code: 1
Error: Error installing new MacPorts base: 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 installing new MacPorts base: command execution failed
$
If I just try to upgrade a particular port, it failed too:
$ sudo port upgrade emacsapp
Password:
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
Error: emacsapp is not installed
$ sudo port search emacs
Password:
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
$ sudo port upgrade emacs-app
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
---> Fetching archive for gperf
---> Attempting to fetch gperf-3.0.4_2.darwin_13.x86_64.tbz2 from http://packages.macports.org/gperf
---> Attempting to fetch gperf-3.0.4_2.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/gperf
---> Attempting to fetch gperf-3.0.4_2.darwin_13.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/gperf
---> Fetching distfiles for gperf
---> Attempting to fetch gperf-3.0.4.tar.gz from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/gperf
---> Verifying checksums for gperf
---> Extracting gperf
Error: org.macports.extract for port gperf returned: command execution failed
Please see the log file for port gperf for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gperf/gperf/main.log
Error: Problem while installing gperf
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
$
Any idea
if this is caused by incompatibility between OS X Mavericks and Macports?
how to fix it?
Edit:
I tried a different computer upgrading it from 10.8.5 to 10.9, and then try to do selfupdate for macports, it did not work again but gave a different error:
$ sudo port -v selfupdate
---> Updating MacPorts base sources using rsync
receiving file list ... done
base.tar
sent 13396 bytes received 10355 bytes 15834.00 bytes/sec
total size is 4925440 speedup is 207.38
receiving file list ... done
base.tar.rmd160
sent 64 bytes received 635 bytes 1398.00 bytes/sec
total size is 512 speedup is 0.73
MacPorts base version 2.2.1 installed,
MacPorts base version 2.2.1 downloaded.
---> Updating the ports tree
Synchronizing local ports tree from file:///opt/local/var/macports/sources/svn.macports.org/trunk/dports/
svn: E155036: Please see the 'svn upgrade' command
svn: E155036: Working copy '/opt/local/var/macports/sources/svn.macports.org/trunk/dports' is too old (format 10, created by Subversion 1.6)
Command failed: /usr/bin/svn update --non-interactive /opt/local/var/macports/sources/svn.macports.org/trunk/dports
Exit code: 1
Error: Synchronization of the local ports tree failed doing an svn update
Error: Couldn't sync the ports tree: Synchronization of 1 source(s) 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: Couldn't sync the ports tree: Synchronization of 1 source(s) failed
Install the "Command Line Tools" first:
sudo xcode-select --install
(Explicitly agreeing to the license is sometimes necessary via "sudo xcodebuild -license")
Then upgrade the ports:
sudo port -v selfupdate
I answered a similar question. The location of the Tcl framework has changed, breaking the existing MacPorts infrastructure. The 2.2.1 installer for Mavericks has since become available here. Make a list of your installed ports, and consider deleting /opt/local prior to installing. You will likely need to 'update' everything anyway.
There might be a chance that you haven't agreed with the XCode license.
If xcode-install doesn't help, you can run the belowing command to agree with Xcode license.
sudo xcodebuild -license
there is an actual bug with
gperf #3.0.4: error: expected parameter declarator
thankfully this issue has its own ticket at MacPorts ticket 40918
if anything you could read all the issues in Mavericks at http://trac.macports.org/wiki/MavericksProblems
I had the same issue. I am assuming that you had Xcode command line utils installed previously. Just launch XCODE and let it finish configuration. Now rerun port command and it should work properly.
I got an error with selfupdate, and resolved it by doing a fresh installation of MacPorts from http://www.macports.org/install.php. Now I can run the selfupdate command without error and install other ports.
The error I were seeing was below, it seems the same problem as Yo Sophia has pointed out:
$ sudo port selfupdate
Password:
---> Updating MacPorts base sources using rsync
MacPorts base version 2.1.3 installed,
MacPorts base version 2.2.1 downloaded.
---> Updating the ports tree
---> MacPorts base is outdated, installing new version 2.2.1
Installing new MacPorts release in /opt/local as root:admin; permissions 0755; Tcl-Package in /Library/Tcl
Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: command execution failed
I mainly wanted to comment on #Brett's answer above (sorry, SO n00b still, not allowed) and share my experience upgrading... not really a new answer, but hopefully some useful info.
I downloaded and installed the Mavericks MacPorts installer as described above, (but without removing /opt, as suggested by #King Julian did self update which was fine, and then upgrade outdated and it seems to be uninstalling and reinstalling all my ports with a message:
Warning: Deactivate forced. Proceeding despite dependencies.
on each one. Luckily i made a copy of the etc and apache2/conf dirs, so should be able to get my config back when it eventually finishes... after 30 minutes or so it threw an error
Unable to open port: extra characters after close-quote
So i did self update again and upgrade outdated seems to run again...
So looks like it can be done (LAMP all working anyway) - it might have been quicker to start again from scratch, but make sure you have at least a couple of hours spare for this (and be connected to mains power ;)
Apologies if too much info, but hope it helps!
The problem seems to be with Macports and the location of the Tcl framework and it's path once Xcode has been installed. I suggest installing a fresh version of Macports for Mavericks here : http://www.macports.org/install.php.
I had this issue on Mountain Lion and it was actually to do with MacPorts looking at an old XCode path (I had several versions including betas installed). I ran with the -d option and checked the config.log file at /opt/local/var/macports/sources/rsync.macports.org/release/base and it reported some errors:-
--- snip ---
...
configure:3331: checking for C compiler version
configure:3340: gcc --version >&5
Configured with: --prefix=/Applications/Xcode5-DP3.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
xcrun: Error: could not stat active Xcode path '/Applications/Xcode5-DP3.app/Contents/Developer'. (No such file or directory)
configure:3351: $? = 0
configure:3340: gcc -v >&5
Configured with: --prefix=/Applications/Xcode5-DP3.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
xcrun: Error: could not stat active Xcode path '/Applications/Xcode5-DP3.app/Contents/Developer'. (No such file or directory)
...
--- snip ---
So I gave it the correct path using:-
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
and that fixed it.
I got my clues from this useful page.

Installing RVM: Synchronization of the local ports tree failed doing rsync

I'm new to Ruby and working with the terminal. I installed the rvm, but I can't seem to be able to install Ruby 1.9.3. The problem seems to be with rsync and synching the ports tree. I have no idea what this means.
I tried looking up other solutions, but none of them are pertinent to rvm(that I could understand. They all just focused on autoupdated macports through itself). I also saw things about proxys, but I have no idea what I'd need to do if that was true. They all mainly focus on macports, and surround using words like "sudo" or -d, which I don't know how to do when just trying to install Ruby. Here is what I get:
$ rvm install 1.9.3
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.7/x86_64/ruby-1.9.3-p429.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing requirements for osx, might require sudo password.
Installing macports............................................................................................................................................................................................................................................................................................................................Password:
.............................................................................................................................................................................................................................................
DEBUG: Copying /Users/Elvis/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
receiving file list ... done
base.tar
sent 58 bytes received 955032 bytes 272882.86 bytes/sec
total size is 3594240 speedup is 3.76
receiving file list ... done
base.tar.rmd160
sent 58 bytes received 635 bytes 1386.00 bytes/sec
total size is 512 speedup is 0.74
DEBUG: successful verification with key /opt/local/share/macports/macports-pubkey.pem
DEBUG: /usr/bin/tar -C /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/tmp -xf /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/base.tar
MacPorts base version 2.1.3 installed,
DEBUG: Rebuilding and reinstalling MacPorts if needed
MacPorts base version 2.1.3 downloaded.
---> Updating the ports tree
Synchronizing local ports tree from rsync://rsync.macports.org/release/tarballs/ports.tar
DEBUG: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/tarballs/ports.tar /opt/local/var/macports/sources/rsync.macports.org/release/tarballs
receiving file list ... done
ports.tar
WARNING: ports.tar failed verification -- update discarded (will try again).
rsync: read errors mapping "/tarballs/ports.tar" (in release): No data available (61)
ports.tar
sent 80 bytes received 11948570 bytes 682780.00 bytes/sec
total size is 53186560 speedup is 4.45
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(1400) [generator=2.6.9]
Command failed: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/tarballs/ports.tar /opt/local/var/macports/sources/rsync.macports.org/release/tarballs
Exit code: 23
Error: Synchronization of the local ports tree failed doing rsync
DEBUG: Couldn't sync the ports tree: Synchronization of 1 source(s) failed
while executing
"macports::selfupdate [array get global_options] base_updated"
Error: /Users/Elvis/.rvm/bin/port: port selfupdate failed: Couldn't sync the ports tree: Synchronization of 1 source(s) failed
Elviss-MacBook-Pro:~ Elvis$ ./port -d selfupdate
-bash: ./port: No such file or directory
I tried using some of the keywords/answers I saw online at the end, which explains the ./port line. I've installed command lines from xcode. Would installing homebrew help fix this problem? I'd appreciate any kind of help!
make sure the following command runs properly
port selfupdate
and then try again

Resources