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

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

Related

Error: Failed to install Homebrew Portable Ruby (and your system version is too old)

Hello Guys Can U help For Mac ?
==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:1f50bf80583bd436c9542d4fa5ad47df0ef0f0bea22ae710c4f04c42d7560bca
Already downloaded:
/Users/mda/Library/Caches/Homebrew/portable-ruby-2.6.8_1.el_capitan.bottle.tar.gz
Error: Checksum mismatch. Expected:
1f50bf80583bd436c9542d4fa5ad47df0ef0f0bea22ae710c4f04c42d7560bca
Actual:
65193ff2dfdd121466094ed9db6a01486f41b7d507c66be2862442fd617f9ced
Archive:
/Users/mda/Library/Caches/Homebrew/portable-ruby-2.6.8_1.el_capitan.bottle.tar.gz
To retry an incomplete download, remove the file above. Error: Failed
to install Homebrew Portable Ruby (and your system version is too
old)!

libboost1.74-dev is not installing on Ubuntu 16.04

My current boost package is libboost-all-dev(default version 1.58.0.1) which is very old for my current need. So I tried -
sudo apt-get install libboost1.74 libboost1.74-dev
It showed me error of somekind -
libboost1.74 is already the newest version (1.74-0~16~ubuntu16.04.1).
The following NEW packages will be installed:
libboost1.74-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/9,325 kB of archives.
After this operation, 139 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 393826 files and directories currently installed.)
Preparing to unpack .../libboost1.74-dev_1.74-0~16~ubuntu16.04.1_amd64.deb ...
Unpacking libboost1.74-dev (1.74-0~16~ubuntu16.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libboost1.74-dev_1.74-0~16~ubuntu16.04.1_amd64.deb (--unpack):
trying to overwrite '/usr/include/boost/exception_ptr.hpp', which is also in package libboost1.58-dev:amd64 1.58.0+dfsg-5ubuntu3.1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libboost1.74-dev_1.74-0~16~ubuntu16.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
However I tried several times before to manually install boost libraries. They does not seem to work though so I deleted them manually. Is this problem related to my manual deletion process? Or maybe I am doing something wrong?
The message makes it clear that you need to uninstall 1.58 first:
trying to overwrite '/usr/include/boost/exception_ptr.hpp', which is also in package libboost1.58-dev

Requirements Error while installing Ruby using RVM

I'm getting the following error while trying to install Ruby 2.0.0 with RVM (Linux Mint 17)
A previous answer here recommends that I "Remove broken or 404 repos from my sources list /etc/apt/sources.list"
The problem is that on Linux Mint 17, my sources list has only one line #deb cdrom:[Linux Mint 17 _Qiana_ - Release amd64 2xxxxxxx]/ trusty contrib main non-free.
Therefore,the three broken 404 repos:
http://ppa.launchpad.net/w-vollprecht/ppa/ubuntu/dists/trusty/main/source/Sources 404 not found
http://ppa.launchpad.net/w-vollprecht/ppa/ubuntu/dists/trusty/main/binary-amd64/Packages 404 not found
http://ppa.launchpad.net/w-vollprecht/ppa/ubuntu/dists/trusty/main/binary-i386/Packages 404 not found
are not in this sources.list file
Can you help me on this?
$ rvm install ruby 2.0.0
Searching for binary rubies, this might take some time.
No binary rubies available for: mint/17/x86_64/ruby-2.0.0-p481.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for mint.
Installing requirements for mint.
Updating system................
Error running 'requirements_debian_update_system ruby-2.0.0-p481',
showing last 15 lines of /home/james/.rvm/log/1xxxxxxxxx_ruby-2.0.0-p481/update_system.log
++ case "${TERM:-dumb}" in
++ case "$1" in
++ [[ -t 2 ]]
++ return 1
++ printf %b 'There has been error while updating '\''apt-get'\'', please give it some time and try again later.
For 404 errors check your sources configured in:
/etc/apt/sources.list
/etc/apt/sources.list.d/*.list
\n'
There has been error while updating 'apt-get', please give it some time and try again later.
For 404 errors check your sources configured in:
/etc/apt/sources.list
/etc/apt/sources.list.d/*.list
++ return 100
Requirements installation failed with status: 100.
As it says in the answer I linked to in my question,
RVM will fail if you don't remove or comment out any broken or 404 Repos from your sources list /etc/apt/sources.list
The problem is that for some reason, you cant get direct access to all the repos on LinuxMint 17... unlike Ubuntu.
I ran sudo apt-get update:
This will show you the broken packages at the end... For me, this was:
http://ppa.launchpad.net/w-vollprecht/ppa/ubuntu/dists/trusty/main/source/Sources
404 not found
http://ppa.launchpad.net/w-vollprecht/ppa/ubuntu/dists/trusty/main/binary-amd64/Packages
404 not found
http://ppa.launchpad.net/w-vollprecht/ppa/ubuntu/dists/trusty/main/binary-i386/Packages
404 not found
Since I cant just comment it out because I don't have access to the full source.list (or I cant find it), I found out that in Linux Mint 17, you can use the GUI.
So I went to Menu >> Software >> Software Sources >> PPA to un-tick the broken Launchpad Repos.
After doing this, I ran rvm install 2.0.0 again and everything worked as expected.
The new standard sources.list moved to
/etc/apt/sources.list.d/official-package-repositories.list
And before modifications of it try to run
sudo apt-get update

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.

Bad Exit Status from rpmbuild on Mac OSX

I'm working on packaging up some work into an rpm. I am doing this on Mac OSX after brew installing rpm. I have a basic .spec file, but I am getting an error and have been unable to diagnose it:
$ rpmbuild -ba myapp.spec
Executing(%prep): %{__spec_prep_cmd} /usr/local/Cellar/rpm/5.4.10/var/tmp/rpm-tmp.14478
error: Bad exit status from /usr/local/Cellar/rpm/5.4.10/var/tmp/rpm-tmp.14478 (%prep)
RPM build errors:
Bad exit status from /usr/local/Cellar/rpm/5.4.10/var/tmp/rpm-tmp.14478 (%prep)
The spec files is as follows:
Name: myapp
Version: 0.1.0
Release: 1
Summary: Web service to do stuff
URL: http://myapp.com
BuildRoot: %{_tmppath}/myapp-build-root
%description
My app
%prep
%build
%install
%pre
%preun
%postun
%clean
%files
%defattr(-,www-data,www-data,-)
%doc
This is my first time building an rpm, what am I doing wrong, and how can I fix this. Thanks in advance!
I ran into the same issue today. For no obvious reason the %prep macro fails, even without any content.
Running your spec on my Ubuntu box seems to work just fine after adding those two values:
License: yourLicense
Group: yourGroup
I have reason to believe, that rpm didn't get installed correctly on my box via homebrew. I think I aborted the process at some point, then forgot about it over lunch, but rpmbuild was available to use from within my script and I ran into the issue above.
I will try doing a clean install of the rpm formula in verbose mode to see whether my assumption is correct.
Update:
I've installed rpm successfully, but it took an awful long time:
/usr/local/Cellar/rpm/5.4.10: 187 files, 9.7M, built in 92.4 minutes
Nevertheless, it keeps on failing with the same error
rpmbuild -ba so.spec
Executing(%prep): %{__spec_prep_cmd} /usr/local/Cellar/rpm/5.4.10/var/tmp/rpm-tmp.69701
error: Bad exit status from /usr/local/Cellar/rpm/5.4.10/var/tmp/rpm-tmp.69701 (%prep)
With the content of /usr/local/Cellar/rpm/5.4.10/var/tmp/rpm-tmp.69701 saying:
%{__spec_prep_template}%{__spec_prep_post}

Resources