install g++8 success but check version still 5 - g++

I run below command to install g++-8,
sudo apt install g++-8
Command success but after install, I run below command to check g++ version:
g++ --version
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
It still the old version.

Related

bazel 0.21.0 install from installer fails on ubuntu 18.04.1

I want to install tensorflow-1.13.0-rc2.
But when I want to install bazel 0.21.0 on ubuntu 18.04.1, the steps I take don't work.
At the directory of my installer, I run:
$sudo apt-get install pkg-config zip g++ zlib1g-dev unzip
$chmod +x bazel-0.21.0-installer-linux-x86_64.sh
$./bazel-0.21.0-installer-linux-x86_64.sh --user
Then I edit the bashrc file by adding this:
export PATH="$PATH:$HOME/bin"
(Then I save the file and run the shell; afterwards, I restart the terminal of ubuntu.)
The above steps follow this link.
Finally when I run
bazel version
terminal gives me
Command 'bazel' not found, did you mean:
command 'babel' from deb openbabel
Try: sudo apt install
Please help, thanks.
After carefully watch the differences between my steps and official website....
I don't know why but I found that
$sudo apt-get install pkg-config zip g++ zlib1g-dev unzip
is wrong.
$sudo apt-get install pkg-config zip g++ zlib1g-dev unzip python
is the correct one.
Re-run those steps, and bazel 0.21.0 is indeed installed.

Getting error java.lang.UnsatisfiedLinkError: no jzmq in java.library.path in IntelliJ ide with windows 10

I have a java project which have zeromq implementation. i have installed zeromq windows version in my windows 10 OS.
When running the application i am getting above error.
I have downloaded zeromq (windows) installer from http://zeromq.org/area:download and installed it in C:\ZeroMQ4.0.4 folder.
Any idea what further action i have to take?
As i am not able to successfully work it in windows i have installed it in a ubuntu 16 vm under my windows 10 machine
Steps i have done are
Installed java in ubuntu
apt-get install -y libtool pkg-config build-essential autoconf automake uuid-dev libzmq3-dev checkinstall
Download Required Package
wget https://github.com/zeromq/zeromq4-x/releases/download/v4.0.8/zeromq-4.0.8.tar.gz
wget https://github.com/zeromq/jzmq/archive/v2.2.2.zip
tar -xzf zeromq-4.0.8.tar.gz
unzip v2.2.2.zip
Install ZMQ
cd zeromq-4.0.8
./configure
make
checkinstall it will creat deb package to be removed easily if required
ldconfig
install jzmaq
cd jzmq-2.2.2/
./autogen.sh
./configure
make
make install
*** In case error show up --- autogen.sh: error: could not find libtool. libtool is required to run autogen.sh. run the mentioned command.
ln -s /usr/bin/libtoolize /usr/bin/libtool
Set java_home path in ubuntu
Still i am getting same error when debugging it from my windows 10 machine with Intellij IDE

openssl / ctls trouble with vapor 2

How can I fix these OpenSSL / TLS issues I'm getting with Vapor 2? They are preventing me from compiling my project on the command line and in Xcode.
During SPM build:
note: you may be able to install ctls using your system-packager:
brew install ctls
note: you may be able to install ctls using your system-packager:
brew install openssl
Upon failure of SPM build:
Linking ./.build/debug/Run
ld: library not found for -lcrypto for architecture x86_64
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
error: exit(1): /Library/Developer/Toolchains/swift-3.1-DEVELOPMENT-SNAPSHOT-2017-03-07-a.xctoolchain/usr/bin/swift-build-tool -f /Users/tanner/Desktop/PackageConfig/.build/debug.yaml
Also in SPM:
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "shim.h"
^
/Users/tanner/Desktop/PackageConfigTwo/.build/checkouts/ctls.git-9210868160426949823/shim.h:4:10: error: 'openssl/conf.h' file not found
#include <openssl/conf.h>
^
/Users/tanner/Desktop/PackageConfigTwo/.build/checkouts/crypto.git-7980259129511365902/Sources/Crypto/Cipher/Cipher+Method.swift:1:8: error: could not build Objective-C module 'CTLS'
import CTLS
^
In Xcode:
/Users/tanner/PackageConfig/.build/checkouts/ctls.git-9210868160426949823/shim.h:4:10: 'openssl/conf.h' file not found
/Users/tanner/PackageConfig/.build/checkouts/crypto.git-7980259129511365902/Sources/Crypto/Cipher/Cipher+Method.swift:1:8: Could not build Objective-C module 'CTLS'
ld: library not found for -lssl
This error means OpenSSL is either not installed or not being properly linked. There are three solutions to this problem.
Option 1: Use Vapor Toolbox (Recommended)
Install the latest version of the Vapor toolbox.
If you have already installed the toolbox, try uninstalling it first:
which vapor
rm -rf /path/to/vapor
1.1 Install (macOS)
Add Vapor's Homebrew Tap
brew tap vapor/homebrew-tap
Update Homebrew and install the toolbox.
brew update
brew install vapor
1.2 Install (Ubuntu)
Add Vapor's APT repo.
Quick Script
eval "$(curl -sL https://apt.vapor.sh)"
Manual
wget -q https://repo.vapor.codes/apt/keyring.gpg -O- | sudo apt-key add -
echo "deb https://repo.vapor.codes/apt $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/vapor.list
Install
sudo apt-get update
sudo apt-get install vapor
1.3 Done
You should now have access to the vapor program and all required dependencies should be installed.
vapor build
vapor xcode
swift build and related commands should now also work normally.
swift build
swift package generate-xcodeproj
Option 2: Install Vapor's CTLS Package
2.1 Install (macOS)
Add Vapor's Homebrew Tap
brew tap vapor/homebrew-tap
Update Homebrew and install CTLS
brew update
brew install ctls
Restart your terminal, re-generate your Xcode project (if using Xcode), and try again.
2.2 Install (Ubuntu)
Add Vapor's APT repo.
Quick Script
eval "$(curl -sL https://apt.vapor.sh)"
Manual
wget -q https://repo.vapor.codes/apt/keyring.gpg -O- | sudo apt-key add -
echo "deb https://repo.vapor.codes/apt $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/vapor.list
Update APT and install CTLS.
sudo apt-get update
sudo apt-get install ctls
2.3 Done
swift build and other commands should now work normally.
Option 3: Manually Install and Link OpenSSL or Equivalent
3.1 Install (macOS)
Install OpenSSL (or any other similar SSL library)
brew install openssl
brew install libressl
3.2 Install (Ubuntu)
Install OpenSSL (or any other similar SSL library)
sudo apt-get install libssl-dev
3.3 Finding Linker Flags
You can use pkg-config (available on brew and apt) to find linker flags or most packages.
pkg-config <package-name> --cflags
pkg-config <package-name> --libs
However, OpenSSL installed through Homebrew cannot be linked and thus does not work with pkg-config. These flags should work:
include: /usr/local/opt/openssl/include
libs: /usr/local/opt/openssl/lib
Note, some libraries will be installed into /usr/include and /usr/lib which does not require explicit linker flags. OpenSSL through APT is installed this way.
3.4 Using Linker Flags
Linker flags can be added during swift build
swift build -Xswiftc -I/path/to/include -Xlinker -L/path/to/lib
They can also be added during Xcode project generation.
swift package -Xswiftc -I/path/to/include -Xlinker -L/path/to/lib generate-xcodeproj
#tanner0101 your suggestions here https://github.com/vapor/vapor/issues/937 have not resolved the issue for me. I get the CTLS is missing error not only on High Sierra but also on Ubuntu inside a Docker container.
The project is manually executable but MySQL does not work. I think that this https://github.com/vapor/vapor/issues/954 and this https://github.com/uchicago-cloud/mpcs51033-2017-spring-forum/issues/54 are not just deployment on Heroku issues.

How to install valgrind on mac os 10.9

Port does not support installing valgrind on the latest mac os. And I could not compile it from source code. I am wondering if someone has installed it on mac os 10.9. Here is the error message I got:
./autogen.sh
running: aclocal
running: autoheader
autoheader: error: AC_CONFIG_HEADERS not found in configure.ac
error: while running 'autoheader'
I installed it from a patched branch here, this is how my installation worked, try following the steps::
//Make sure you have autoconf and automake both are installed.
sudo port -v install automake
sudo port -v install autoconf
//get patched valgrind on "homebrew" branch
cd ~/some_directory
git clone https://github.com/fredericgermain/valgrind/ -b homebrew
cd valgrind
//clone it
git submodule init
git submodule update
//compile valgrind
./autogen.sh
./configure
make
sudo make install
//confirm installation
calvin % which valgrind

installing Mod_Mono and Xsp4 on CentOS 6.3

I've gotten Mono 3.0.1 installed, but I'm running into tons of dependency issues trying to install Mod_Mono and Xsp4, Has anyone gotten this to work? If so what were some of the steps you had to take? Is there a central location for this?
Thank you so much for taking the time to read my question and happy coding!
Enviroment:
Centos 6.3 basic install
Apache/2.2.15
Installation steps:
#Install required software
yum -y install httpd httpd-devel make glib2-devel libpng-devel libjpeg-devel
giflib-devel libtiff-devel libX11-devel gcc* fontconfig-devel bison gettext bzip2
libtool automake autoconf wget unzip
directory we will be installing mono in
mkdir -p /opt/mono
cd /tmp
Download & extract source
wget http://download.mono-project.com/sources/mono/mono-2.10.2.tar.bz2
wget http://download.mono-project.com/sources/xsp/xsp-2.10.2.tar.bz2
wget http://download.mono-project.com/sources/mod_mono/mod_mono-2.10.tar.bz2
wget http://download.mono-project.com/sources/libgdiplus/libgdiplus-2.10.tar.bz2
tar -xjf mono-2.10.2.tar.bz2
tar -xjf xsp-2.10.2.tar.bz2
tar -xjf mod_mono-2.10.tar.bz2
tar -xjf libgdiplus-2.10.tar.bz2
compile and install libgdiplus
cd libgdiplus-2.10
./configure --prefix=/opt/mono
make ; make install
compile and install mono
cd ../mono-2.10.2
./configure --prefix=/opt/mono --with-libgdiplus=/opt/mono
make ; make install
Set enviroment vars(make sure to also modify ~/.bash_profile)
export PATH=$PATH:/opt/mono/bin
export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig
compile and install xsp
cd ../xsp-2.10.2
./configure --prefix=/opt/mono
make ; make install
compile and install mod_mono
cd ../mod_mono-2.10
./configure --prefix=/opt/mono --with-mono-prefix=/opt/mono
make ; make install
mv /etc/httpd/conf/mod_mono.conf /etc/httpd/conf.d/
Currently working with mono and xsp4:
[root]# cat /etc/redhat-release
CentOS release 6.7 (Final)
[root]# mono --version
Mono JIT compiler version 4.5.0
[root]# xsp4 --version
xsp4.exe 2.10.2.0
Chazt3n solution is ok, except I had to do some changes to make it work:
I changed the mono version from 4.0 to 4.5 in file: /opt/mono/bin/mod-mono-server4
I ran this command: cp /opt/mono/lib/mono/4.0/xsp4.exe /opt/mono/lib/mono/4.5/
Works well now, thanks.