facing issues while installing Golang - go

I am facing some issues while installing go lang, have used below approach to install it.
sudo apt update
$ sudo curl -O https://storage.googleapis.com/golang/go1.10.1.linux-amd64.tar.gz
$ sudo tar -xvf go1.10.1.linux-amd64.tar.gz
$ sudo mv go /usr/local
everything went fine till the above step.
But when I am giving below command, I am getting a message
$ echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.profile
Message: bash: export: '/usr/local/go/bin': not a valid identifier
$ source ~/.profile

Try this script:
git clone https://github.com/udhos/update-golang
cd update-golang
sudo ./update-golang.sh
Full details: https://github.com/udhos/update-golang

Related

ERROR: The Python zlib extension was not compiled. Missing the zlib?

I'm trying to install Python 2.7.7 using Homebrew AND pyenv on my Mac (MacBook Air, OSX 12.5 Monterrey, 1.6 GHz Dual-Core Intel Core i5) but keep getting this “Missing zlib” error.
Just for reference, I have done the following:
When I Installed pyenv, I ran command nano ~/.bashrc (I'm using bash shell) - and pasted and saved on /.bashrc ---> eval "$(pyenv init -)"
then I ran pyenv install 2.7.7 (didn't work and found online step 3.)
CPPFLAGS="-I$(brew --prefix zlib)/include" pyenv install -v 2.7.7 (Again, same error and did step 4.)
ran brew reinstall zlib and overrode on "/.bashrc" eval "$(pyenv init -)" to:
export PATH="/usr/local/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
export LDFLAGS="-L/usr/local/opt/zlib/lib -L/usr/local/opt/bzip2/lib"
export CPPFLAGS="-I/usr/local/opt/zlib/include -I/usr/local/opt/bzip2/include"
-------------Start of Error ----------------
rm -f /Users/victor/.pyenv/versions/2.7.7/bin/python2
(cd /Users/victor/.pyenv/versions/2.7.7/bin; ln -s python2.7 python2)
rm -f /Users/victor/.pyenv/versions/2.7.7/bin/python2-config
(cd /Users/victor/.pyenv/versions/2.7.7/bin; ln -s python2.7-config python2-config)
rm -f /Users/victor/.pyenv/versions/2.7.7/bin/python-config
(cd /Users/victor/.pyenv/versions/2.7.7/bin; ln -s python2-config python-config)
test -d /Users/victor/.pyenv/versions/2.7.7/lib/pkgconfig || /usr/bin/install -c -d -m 755 /Users/victor/.pyenv/versions/2.7.7/lib/pkgconfig
rm -f /Users/victor/.pyenv/versions/2.7.7/lib/pkgconfig/python2.pc
(cd /Users/victor/.pyenv/versions/2.7.7/lib/pkgconfig; ln -s python-2.7.pc python2.pc)
rm -f /Users/victor/.pyenv/versions/2.7.7/lib/pkgconfig/python.pc
(cd /Users/victor/.pyenv/versions/2.7.7/lib/pkgconfig; ln -s python2.pc python.pc)
rm -f /Users/victor/.pyenv/versions/2.7.7/share/man/man1/python2.1
(cd /Users/victor/.pyenv/versions/2.7.7/share/man/man1; ln -s python2.7.1 python2.1)
rm -f /Users/victor/.pyenv/versions/2.7.7/share/man/man1/python.1
(cd /Users/victor/.pyenv/versions/2.7.7/share/man/man1; ln -s python2.1 python.1)
ERROR: The Python zlib extension was not compiled. Missing the zlib?
Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems
BUILD FAILED (OS X 12.5 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/__/1_b0871s7fl7fpwydg4ycjj80000gn/T/python-build.20220729111901.75727
Results logged to /var/folders/__/1_b0871s7fl7fpwydg4ycjj80000gn/T/python-build.20220729111901.75727.log
Last 10 log lines:
(cd /Users/victor/.pyenv/versions/2.7.7/bin; ln -s python2-config python-config)
test -d /Users/victor/.pyenv/versions/2.7.7/lib/pkgconfig || /usr/bin/install -c -d -m 755 /Users/victor/.pyenv/versions/2.7.7/lib/pkgconfig
rm -f /Users/victor/.pyenv/versions/2.7.7/lib/pkgconfig/python2.pc
(cd /Users/victor/.pyenv/versions/2.7.7/lib/pkgconfig; ln -s python-2.7.pc python2.pc)
rm -f /Users/victor/.pyenv/versions/2.7.7/lib/pkgconfig/python.pc
(cd /Users/victor/.pyenv/versions/2.7.7/lib/pkgconfig; ln -s python2.pc python.pc)
rm -f /Users/victor/.pyenv/versions/2.7.7/share/man/man1/python2.1
(cd /Users/victor/.pyenv/versions/2.7.7/share/man/man1; ln -s python2.7.1 python2.1)
rm -f /Users/victor/.pyenv/versions/2.7.7/share/man/man1/python.1
(cd /Users/victor/.pyenv/versions/2.7.7/share/man/man1; ln -s python2.1 python.1)
Victors-MacBook-Air:~ victor$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
Victors-MacBook-Air:~ victor$
Victors-MacBook-Air:~ victor$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
Victors-MacBook-Air:~ victor$
Victors-MacBook-Air:~ victor$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
Victors-MacBook-Air:~ victor$
Victors-MacBook-Air:~ victor$ software update
-bash: software: command not found
------------- End of Error -----------------
Any idea?.... Please let me know... I'd highly appreciate it
With a similar configuration, 2018 MBA on Monterey, I was having the same problem as you with pyenv install 2.7.6
I was able to go past the missing zlib issue with the following additions to the shell's profile:
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
export LDFLAGS="-L/usr/local/opt/zlib/lib"
export CPPFLAGS="-I/usr/local/opt/zlib/include"
export PKG_CONFIG_PATH="/usr/local/opt/zlib/lib/pkgconfig"
As a side note, the installation still didn't go through due to a different issue:
That OpenSSL issue has to do with OpenSSL 1.0 being EOL, more info here.
At the end I just went with 2.7.14 which is OpenSSL 2.0 compatible and good enough for my use case.
command line tools are already installed, use "Software Update" to install updates
This is indicating you need to use the Settings to update the command line tools.
$ software update
-bash: software: command not found
There is no command line called "software". Instead open system preferences. Then click on this:
Install any updates requested.

Brew stops working after terminal session is closed

I have installed Brew in MACOS Monterey with the following commands.
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
eval "$(homebrew/bin/brew shellenv)"
brew update --force --quiet
chmod -R go-w "$(brew --prefix)/share/zsh"
I have tested it after the install, and it works, however closing the terminal session and opening it again causes terminal to say that the command brew is not found after running it. I can still see the homebrew directory, so Im guessing its in the wrong place for terminal to run it.
The only supported method to install brew is found on brew.sh:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Ok I was able to fix the issue by adding the PATH to the .bash_profile file.

having difficulty installing protocol buffer on ubuntu

I need a specific version of protocol buffer which is 3.14.0 on apt its not available like this
sudo apt install -y protobuf-compiler = 3.14.0
and If I follow these steps by binary :
$ PB_REL="https://github.com/protocolbuffers/protobuf/releases"
$ curl -LO $PB_REL/download/v3.14.0/protoc-3.14.0-linux-x86_64.zip
then
unzip protoc-3.14.0-linux-x86_64.zip -d $HOME/.local
then
$ export PATH="$PATH:$HOME/.local/bin"
from this source
and it's not getting install when I do protoc --version I am getting this error
bash: /usr/bin/protoc: No such file or directory
I think Because /usr/bin/protoc doesn't exist. When you unzipped you got folder named protoc-3.14.0.
which is /usr/bin/protoc-3.14.0
try doing this
PROTOC_ZIP=protoc-3.14.0-linux-x86_64.zip
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/$PROTOC_ZIP
sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
ref: http://google.github.io/proto-lens/installing-protoc.html
Please check out the following steps to Install protoc on Ubundu, Run the commands 1 to 4 on terminal. Then 5 and 6 to finalize the settings.
Get the latest version tag of protoc release and assign it to variable:
1.
PROTOC_VERSION=$(curl -s "https://api.github.com/repos/protocolbuffers/protobuf/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+')
curl -Lo protoc.zip "https://github.com/protocolbuffers/protobuf/releases/latest/download/protoc-${PROTOC_VERSION}-linux-x86_64.zip"
Run the following command to extract executable file from a ZIP archive:
sudo unzip -q protoc.zip bin/protoc -d /usr/local
Set execute permission:
sudo chmod a+x /usr/local/bin/protoc
Now protoc command is available for all users as a system-wide command.
We can now check protoc version:
protoc --version
Remove unnecessary ZIP archive:
rm -rf protoc.zip

installing komozer on fedora 18 ?

i have download kompozer and installed by following step:
~> sudo yum install compat-libstdc++-33
~> sudo cp ~/Download/kompozer-077-i686.tgz /usr/local/src/kompozer/
~> cd /usr/local/src/kompozer
~> sudo tar vfzx kompozer-077-i686.tgz
~> sudo rm kompozer-077-i686.tgx
~> sudo mv kompozer kompozer-077
~> sudo ln -s /usr/local/src/kompozer/kompozer-077/kompozer /usr/local/bin/.
~> source ~/.tcshrc
on running this command
~> kompozer &
i application doesn't start and got an error on terminal :
[root#HyperWorkstation kompozer]# /usr/local/src/kompozer/kompozer-077/run-mozilla.sh:
/usr/local/src/kompozer/kompozer-077/kompozer-bin: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
please help what goes wrong actually i feel bad may happened in .tcshrc file
........... thanx for reply in advance
# yum install ld-linux.so.2
or
$ tar xvzf kompozer-0.8b3.es-ES.gcc4.2-i686.tar.gz
$ cd kompozer
$ ./kompozer-bin

RVM installation fails

I followed the instructions from the RVM homepage (https://rvm.beginrescueend.com/rvm/install/)
I typed the following:
sudo bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
the script executed and didn't seem to give any errors.
the same without sudo gave an error:
Warning: Failed to create the file
Warning: /usr/share/ruby-rvm/archives/wayneeseguin-rvm-stable.tgz: Permission
Warning: denied
0 792k 0 3908 0 0 2257 0 0:05:59 0:00:01 0:05:58 2257
curl: (23) Failed writing body (0 != 3908)
Could not download 'https://github.com/wayneeseguin/rvm/tarball/stable'.
curl returned status '23'.
I also put this in my ~/.bashrc
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
what I get is:
~$ type rvm | head -1
bash: type: rvm: not found
~$ source "/usr/local/rvm/scripts/rvm"
bash: /usr/local/rvm/scripts/rvm: No such file or directory
~$ source "$HOME/.rvm/scripts/rvm"
bash: /home/anonym/.rvm/scripts/rvm: No such file or directory
How can this be fixed?
PS
I'm using Ubuntu 11.10
Sudo problems. This worked for me to install rvm. Just do:
curl -L https://get.rvm.io | sudo bash -s stable --ruby
nano ~/.bashrc
at the bottom of the file add these line
unset rvm_path
unset GEM_HOME
Then run
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.3
rvm use 2.1.3 --default
ruby -v
Can you try this:
$ curl -s raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer | bash -s stable
or
$ curl -s raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer | sudo bash -s stable
depending on your permissions. That should help. It helped me! :)
I'm sure there's a more elegant way to fix this, but I ran into the same issue and was kinda in a hurry, so I went for a quick and dirty workaround:
$ curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer > foo.sh
$ chmod 755 foo.sh
Then edit line 162, and add -k to the curl command:
$ vim foo.sh
162 if curl -Lk https://github.com/${_repo}/rvm/tarball/${_branch} -o ${rvm_archives_path}/${_repo}-rvm-${_branch}.tgz
Then run the script:
$ ./foo.sh --branch stable
Like I said, not ideal, but it got me where I needed to be quickly.
If anyone has this problem in the future in ubuntu I was getting this error because of an old package that still had config stuff hanging around.
Try running
sudo apt-get --purge remove ruby-rvm
That should take care of the permission error and let you install RVM as a normal user under $HOME/.rvm
Put this in your .bashrc instead (without echo)
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
And restart your terminal.
You might have RVM installed under the wrong user. RVM won't let you install if it's installed under another user.
You can uninstall it from the other user with rvm implode.
Log over to the other user and RVM will install correctly!
https://rvm.io/rvm/security#ipv6-issues
You can forbid gpg's internal dirmngr from using IPv6 by add the following line to ~/.gnupg/dirmngr.conf:

Resources