Macports issue setting up RVM - ruby-on-rails

Just setting up rails and RVM on a new laptop and i'm getting this error when running
Error running 'requirements_osx_port_update_system ruby-2.0.0-p247',
please read /Users/#####/.rvm/log/1380821805_ruby-2.0.0-p247/update_system.log
Requirements installation failed with status: 1.
When running this
sudo rvm install ruby
Which produces this code.
[2013-10-03 13:36:45] requirements_osx_port_update_system
requirements_osx_port_update_system ()
{
__rvm_try_sudo port -dv selfupdate || return $?
}
current path: /Users/matthewpetitt
command(2): requirements_osx_port_update_system ruby-2.0.0-p247
DEBUG: Copying /Users/matthewpetitt/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- 42/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: /Users/matthewpetitt/.rvm/bin/port: port selfupdate failed: Error synchronizing MacPorts sources: command execution failed
I already have Xcode and Xcode command line tools installed. Anyone fixed something like this before.

Realized that it was just some network configuration at work that must have been blocking the ports. Check your network permissions or try a different network.

You need to make sure this command can be run first:
sudo port -dv selfupdate
This can be temporary network problem - if it is not follow the displayed instructions.

Related

Issues with running remix Binary in Bazel sandbox

I've encountered an issue trying to use bazel as a build tool for remix. I've been able to run remix in dev mode but currently unable to get remix build to work.
I've encountered a few errors that led up to this point. I'll list the errors in the order which they occurred with my fixes (just incase any of the fixes introduces a new issue)
First error in the bazel sandbox is related to a transitive dependency of #remix-run/dev (#remix-run/dev->gunzip-maybe->browserify-zlib). Bazel failed to fetch the bazel repository #npm__browserify-zlib__0.1.4. I assumed this was a bazel issue and tried to override browserify-zlib#0.1.4 with browserify-zlib#0.2.0, which worked. Here is bazel error for reference:
ERROR: /Users/emmanuel/projects/bbbazel/WORKSPACE:89:17: fetching _npm_import rule //external:npm__browserify-zlib__0.1.4: Traceback (most recent call last):
File "/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/external/aspect_rules_js/npm/private/npm_import.bzl", line 471, column 27, in _impl
pkg_json = json.decode(rctx.read(pkg_json_path))
Error in decode: at offset 685, object has duplicate key: "main"
ERROR: /private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/external/npm/BUILD.bazel:3012:6: #npm//:npm__browserify-zlib__0.1.4_source_directory depends on #npm__browserify-zlib__0.1.4//:source_directory in repository #npm__browserify-zlib__0.1.4 which failed to fetch. no such package '#npm__browserify-zlib__0.1.4//': at offset 685, object has duplicate key: "main"
Next error in the bazel sandbox is related to another transitive dependency of #remix-run/dev (#remix-run/dev->xdm->deasync). The install lifecycle hook for the deasync npm package makes a call to the node-gyp binary which doesn't exist in the sandbox and the bazel build command fails during setup. To fix this, I disabled the install lifecycle hook (I also disabled it with a pnpm install outside the sandbox and the remix build command executed perfectly) which led to the final error. Here's the error message for this error:
/Users/emmanuel/projects/bbbazel/BUILD.bazel:5:22: Running lifecycle hooks on npm package deasync#0.1.28 failed: (Exit 1): lifecycle-hooks.sh failed: error executing command (from target //:.aspect_rules_js/node_modules/deasync#0.1.28/lc) bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/external/aspect_rules_js/npm/private/lifecycle/lifecycle-hooks.sh deasync ../../../external/npm__deasync__0.1.28/package ... (remaining 1 argument skipped)
/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/external/aspect_rules_js/npm/private/lifecycle/min/node-gyp-bin/node-gyp: line 5: 1211: command not found
node-gyp not found! Please upgrade your install of npm! You need at least 1.1.5 (I think) and preferably 1.1.30.
> deasync#0.1.28 install /private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/deasync#0.1.28/node_modules/deasync
> node ./build.js
===============================================================
Failure while running lifecycle hook for package 'deasync#0.1.28':
Script: 'install'
Command: `node ./build.js`
Stack trace:
spawn ENOENT
at ChildProcess.<anonymous> (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/external/aspect_rules_js/npm/private/lifecycle/min/index.min.js:1:91930)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1100:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
The final error suggests a bug with remix, but since it only occurs in the bazel sandbox I think it may be an issue that cuts across bazel and remix. The error returned is shown below:
The following error is a bug in Remix; please open an issue! https://github.com/remix-run/remix/issues/new
Missing output for entry point
Error
at Object.onCompileFailure (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/sandbox/darwin-sandbox/1566/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/#remix-run+dev#1.12.0_#remix-run+serve#1.12.0/node_modules/#remix-run/dev/dist/cli/commands.js:180:13)
at Object.compile (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/sandbox/darwin-sandbox/1566/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/#remix-run+dev#1.12.0_#remix-run+serve#1.12.0/node_modules/#remix-run/dev/dist/compiler/remixCompiler.js:34:134)
at async Object.build (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/sandbox/darwin-sandbox/1566/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/#remix-run+dev#1.12.0_#remix-run+serve#1.12.0/node_modules/#remix-run/dev/dist/compiler/build.js:33:3)
at async Object.build (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/sandbox/darwin-sandbox/1566/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/#remix-run+dev#1.12.0_#remix-run+serve#1.12.0/node_modules/#remix-run/dev/dist/cli/commands.js:175:3)
at async Object.run (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/sandbox/darwin-sandbox/1566/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/#remix-run+dev#1.12.0_#remix-run+serve#1.12.0/node_modules/#remix-run/dev/dist/cli/run.js:449:7)
Building Remix app in production mode...
Target //examples/remix:build failed to build
I've tried to run it outside bazel and with pnpm (I added the override to the package.json for browserify-zlip#0.2.0, then I ran pnpm instal with --ignore-scripts flag) and it builds fine.
I'm not sure if this is a bug with remix or a bazel issue. Has anyone else experienced this? Or does anyone having a working version of remix with bazel as the build tool?
I've created a minified version of the repository in the state of the 3rd error https://github.com/noelenwenede/bbbazel. Start up instructions are in the readme file.

Fail to install signed package with peer chaincode install command

I follow the instruction in the following link to install signed package.
https://hyperledger-fabric.readthedocs.io/en/v1.0.0-beta/cc-packaging-and-signing.html
But I got the following error when execute "peer chaincode install ccpack.out".
The error message is
Error: Error endorsing chaincode: rpc error: code = Unknown desc = proto: bad wiretype for field peer.ChaincodeSpec.Type: got wiretype 2, want 0
If I omit the -s flag in the create chaincode package step, the the raw ChaincodeDeploymentSpe can be successfully installed.
Can someone help me how to install the package with signature (i.e. with -s flag)?
There is a CR pending review https://gerrit.hyperledger.org/r/#/c/12727/ which should fix this issue.

Failed to install rabbitmq-server on Linux(Oracle Linux Server release 6.7/RHEL)

I am getting following error while installing.
$ sudo yum install rabbitmq-server
Loaded plugins: aliases, changelog, fastestmirror, kabi, presto, refresh-packagekit, security, tmprepo, ulninfo, verify, versionlock
Loading support for kernel ABI
Setting up Install Process
Loading mirror speeds from cached hostfile
* epel: archive.linux.duke.edu
* ol6_UEKR3: slcac475.us.oracle.com
* ol6_latest: slcac475.us.oracle.com
Resolving Dependencies
--> Running transaction check
---> Package rabbitmq-server.noarch 0:3.1.5-1.el6 will be installed
--> Finished Dependency Resolution`
...
...
...
groupadd: Can't get unique system GID (no more available GIDs)
useradd: group 'rabbitmq' does not exist
error: %pre(rabbitmq-server-3.1.5-1.el6.noarch) scriptlet failed, exit status 6
Error in PREIN scriptlet in rpm package rabbitmq-server-3.1.5-1.el6.noarch
error: install: %pre scriptlet failed (2), skipping rabbitmq-server-3.1.5-1.el6
Verifying :
rabbitmq-server-3.1.5-1.el6.noarch
Failed
rabbitmq-server.noarch 0:3.1.5-1.el6
Complete!
Note: I have already installed the erlang
I have refereed few posts already there
Installing rabbitmq-server on RHEL
RabbitMQ install issue on Centos 5.5
Go to /etc/login.defs and check if you have something like this, if not add it into it.
SYS_GID_MIN 2000
SYS_GID_MAX 9000

Unit neo4j-service.service failed to load

installed neo4j 2.2.1 after first removing the previous version.
service neo4j-service start
produces the error:
Failed to start neo4j-service.service: Unit neo4j-service.service failed to load: No such file or directory.
System is:
system: os => {"name"=>"Ubuntu", "family"=>"Debian", "release"=>{"major"=>"15.04", "full"=>"15.04"}, "lsb"=>{"distcodename"=>"vivid", "distid"=>"Ubuntu", "distdescription"=>"Ubuntu 15.04", "distrelease"=>"15.04", "majdistrelease"=>"15.04"}}
Output of the install script:
root#cb-8:~# aptitude install neo4j -y # Install Neo4j, community edition
The following NEW packages will be installed:
daemon{a} neo4j
0 packages upgraded, 2 newly installed, 0 to remove and 0 not to upgrade.
Need to get 0 B/53.2 MB of archives. After unpacking 62.4 MB will be used.
Selecting previously unselected package daemon.
(Reading database ... 183856 files and directories currently installed.)
Preparing to unpack .../daemon_0.6.4-1_amd64.deb ...
Unpacking daemon (0.6.4-1) ...
Selecting previously unselected package neo4j.
Preparing to unpack .../archives/neo4j_2.2.1_all.deb ...
Unpacking neo4j (2.2.1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (219-7ubuntu3) ...
Setting up daemon (0.6.4-1) ...
Setting up neo4j (2.2.1) ...
update-rc.d: error: initscript does not exist: /etc/init.d/neo4j-service
dpkg: error processing package neo4j (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
neo4j
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package. Trying to recover:
Setting up neo4j (2.2.1) ...
update-rc.d: error: initscript does not exist: /etc/init.d/neo4j-service
dpkg: error processing package neo4j (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
neo4j
root#cb-8:~# service neo4j-service status
● neo4j-service.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
/etc/init.d/neo4j-service does in fact exist.
lrwxrwxrwx 1 root root 36 Mar 5 17:28 /etc/init.d/neo4j-service -> /opt/neo4j-community-2.1.7/bin/neo4j
I'm out of ideas and hoping someone might be able to point me in the right direction.
~ Ross
I had the same exact error. However, if installing newer version (3.3.0 in my case) of neo4j the syntax is different. It should be:
service neo4j start
not
service neo4j-service start
To double check you can do:
ls /etc/init.d | grep neo4j
In my case it finds neo4j
Problem solved.
2.2.1 was still linking to 2.1.7 somehow.
removed the spurious link and it all worked.

RabbitMQ will not start after upgrade 3.3.3-1

After updating RabbitMQ to version 3.3.3-1 using their APT repository, it will no longer start:
Setting up rabbitmq-server (3.3.3-1) ...
* Starting message broker rabbitmq-server * FAILED - check /var/log/rabbitmq/startup_{log, _err}
[fail]
invoke-rc.d: initscript rabbitmq-server, action "start" failed.
dpkg: error processing package rabbitmq-server (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
rabbitmq-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
startup_log:
{"init terminating in do_boot",{{case_clause,{ok,[]}},[{rabbit_prelaunch,dist_port_set_check,0,[]},{rabbit_prelaunch,start,0,[]},{init,start_it,1,[]},{init,start_em,1,[]}]}}
startup_err:
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
erl_crash.dump
I'm running Ubuntu 14.04 LTS (GNU/Linux 3.13.0-29-generic x86_64)
Erlang version: 1:17.0
I can't seem to find any information on why it is failing to start. Any help would be much appreciated.
Looking at rabbit_prelaunch I think this could happen if you have a config file but it is completely empty. That's not allowed (not a legal Erlang term), but this exception certainly sucks. I'll file a bug to fix that.
EDIT: fixed in 3.3.4.

Resources