Error when try to install BEEGO - go

I am very new with GO, and when I tried to install the framwork beego on my Windows 8 Desktop or in a VirtualBox with Debian8 I had the same error:
sergi#odoo:~$ go get github.com/astaxie/beego
# github.com/astaxie/beego
work/src/github.com/astaxie/beego/tree.go:144: syntax error: unexpected range, expecting {
work/src/github.com/astaxie/beego/tree.go:155: syntax error: unexpected else, expecting semicolon or newline
work/src/github.com/astaxie/beego/tree.go:157: non-declaration statement outside function body
work/src/github.com/astaxie/beego/tree.go:158: non-declaration statement outside function body
work/src/github.com/astaxie/beego/tree.go:159: non-declaration statement outside function body
work/src/github.com/astaxie/beego/tree.go:160: syntax error: unexpected }
work/src/github.com/astaxie/beego/tree.go:257: syntax error: unexpected range, expecting {
work/src/github.com/astaxie/beego/tree.go:267: syntax error: unexpected else, expecting semicolon or newline or }
work/src/github.com/astaxie/beego/tree.go:283: syntax error: unexpected }

You seem to be using an old Go version which is failing to build the beego package.
Note that the package is only tested against go 1.5.1. So try upgrading to go 1.5.x and attempt to fetch it again.
https://github.com/astaxie/beego/blob/master/.travis.yml#L4
I'm pretty sure the upgrade will fix your issues.

The empty for range loops were introduced in Go 1.4. Your Go version seems to be older. Check your version with
go version
and if it's older than 1.4, install a newer version from the official website.

Related

Parse error: syntax error, unexpected '$kernel' (T_VARIABLE) in the index.php file

When I upload my Laravel project to cPanel I get the following error
Parse error: syntax error, unexpected '$kernel' (T_VARIABLE)
Your php version is too low. Try version 7.0 or later php.

Usearch install error

I'm trying to run usearch through Ubuntu Bash (on Windows 10)I'm having real trouble in assigning it to the right path. This is the error I keep getting:
/usr/bin/usearch10.0.240_i86linux32: 1: /usr/bin/usearch10.0.240_i86linux32: Syntax error: "(" unexpected
error, no response from your usearch command (usearch10.0.240_i86linux32)
is it installed and in path?
Has anyone else had this problem?
Thanks
Rachel

Ruby bug with fresh install (no implicit conversion of nil into String)

I updated Ruby. When I request Ruby version in CLI, it works, but when I request for the Gem version, it returns the following error:
C:/Ruby23/lib/ruby/2.3.0/rubygems/config_file.rb:90:in `join': no implicit conversion of nil into String (TypeError)
The error is found on a portable version on Windows, as well as on an installed version.
I don't know what to do to run a working version of Ruby. Does anyone already got this bug or have a clue to resolve this?
You need to somehow set the environment variable SYSTEM_CONFIG_PATH
Here's line 90 of rubygems/config_file.rb:
SYSTEM_WIDE_CONFIG_FILE = File.join SYSTEM_CONFIG_PATH, 'gemrc'
That fails when SYSTEM_CONFIG_PATH is nil.
Searching the exact error message "no implicit conversion of nil into String", I finally found a working solution (may not be the best).
I replace the line 90:
SYSTEM_WIDE_CONFIG_FILE = File.join SYSTEM_CONFIG_PATH, 'gemrc'
With:
SYSTEM_WIDE_CONFIG_FILE = File.join SYSTEM_CONFIG_PATH.to_s, 'gemrc'

Getting wrong when installing tensorflow from source

I had been trying to install tensorflow for a few day. However, cuda 7.5 is the version that tensorflow r0.10.0 supports default. So I can only install it from source. But I came after the following problem which bother me a lot.
.....
INFO: Reading options for 'clean' from /home/lhx/tensorflow-r0.10/tools/bazel.rc:
Inherited 'build' options: --force_python=py2 --host_force_python=py2 --python2_path=/usr/bin/python --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --define PYTHON_BIN_PATH=/usr/bin/python --spawn_strategy=standalone --genrule_strategy=standalone
Unrecognized option: --host_force_python=py2
ERROR: /home/lhx/tensorflow-r0.10/WORKSPACE:18:6: First argument of load() is a path, not a label. It should start with a single slash if it is an absolute path..
ERROR: /home/lhx/tensorflow-r0.10/WORKSPACE:22:6: First argument of load() is a path, not a label. It should start with a single slash if it is an absolute path..
ERROR: WORKSPACE file could not be parsed.
ERROR: package contains errors: third_party/boringssl.
ERROR: no such package 'external': Package 'external' contains errors.
Configuration finished
I just can't figure out what is going wrong and I have been trying for so long.
I experienced similar errors when my bazel was too outdated. You can try newer bazel version.

Fatal error: syntax error, unexpected T_SL running on MAMP

i updated to new version of MAMP 2.1 and I have got a problem with running project based on Zend Framework.
If I trying to run script, obtain error
Fatal error: syntax error, unexpected T_SL running on MAMP
Is any possibility, hot solve it?
Thanks for any advice.
T_SL means <<
please check your source code

Resources