How to run a pds-client? - voximplant

I've 0 knowledge in Go, but I'm trying to run a pds client explained in https://github.com/voximplant/pds-sample-client, but get errors when run.
When try to execute ./generate_proto.sh, I get:
-bash: ./generate_proto.sh: Permission denied
I tryed installing go1.12 and installing the package and get that golang.org/x/net/http2 requires Go 1.17
$ wget https://go.dev/dl/go1.12.linux-amd64.tar.gz
$ rm -rf /usr/local/go && tar -C /usr/local -xzf go1.12.linux-amd64.tar.gz
$ export PATH=$PATH:/usr/local/go/bin
$ go version
go version go1.12 linux/amd64
$ go get -u google.golang.org/grpc#v1.20.1
$ go run main.go
# golang.org/x/net/http2
/root/go/pkg/mod/golang.org/x/net#v0.0.0-20220826154423-83b083e8dc8b/http2/client_conn_pool.go:303:6: undefined: errors.Is
/root/go/pkg/mod/golang.org/x/net#v0.0.0-20220826154423-83b083e8dc8b/http2/server.go:2750:9: h.Clone undefined (type http.Header has no field or method Clone)
/root/go/pkg/mod/golang.org/x/net#v0.0.0-20220826154423-83b083e8dc8b/http2/transport.go:426:30: undefined: errors.Is
/root/go/pkg/mod/golang.org/x/net#v0.0.0-20220826154423-83b083e8dc8b/http2/transport.go:426:45: undefined: os.ErrDeadlineExceeded
/root/go/pkg/mod/golang.org/x/net#v0.0.0-20220826154423-83b083e8dc8b/http2/transport.go:2109:5: undefined: errors.Is
/root/go/pkg/mod/golang.org/x/net#v0.0.0-20220826154423-83b083e8dc8b/http2/transport.go:2113:5: undefined: errors.Is
/root/go/pkg/mod/golang.org/x/net#v0.0.0-20220826154423-83b083e8dc8b/http2/transport.go:2117:5: undefined: errors.Is
note: module requires Go 1.17
So I tried with lastest version go1.19
$ wget https://go.dev/dl/go1.19.linux-amd64.tar.gz
$ rm -rf /usr/local/go && tar -C /usr/local -xzf go1.19.linux-amd64.tar.gz
$ export PATH=$PATH:/usr/local/go/bin
$ go version
go version go1.19 linux/amd64
$ go get -u google.golang.org/grpc#v1.20.1
go: downloading google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf
go: downloading golang.org/x/sys v0.0.0-20220829200755-d48e67d00261
go: module github.com/golang/protobuf is deprecated: Use the "google.golang.org/protobuf" module instead.
go: upgraded golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64 => v0.0.0-20220829200755-d48e67d00261
$ go run main.go
panic: grpc: no transport security set (use grpc.WithInsecure() explicitly or set credentials)
goroutine 1 [running]:
main.main()
/home/pds-sample-client/main.go:17 +0x367
exit status 2
Please, has anyone been able to make it run, or If anyone been able to run a pds client in node or python?

Related

configure: error: libopenvswitch.a was not found. Try --with-ovs-libpath

When i use this command:
./configure --with-ovs-srcdir=/home/mx/SDN/openvswitch-2.10.1 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
I had got the error result:
configure: error: libopenvswitch.a was not found. Try --with-ovs-libpath
But in my computer, i can find libopenvswitch.a file:
/lib/libopenvswitch.a
/usr/local/lib/libopenvswitch.a
/home/mx/SDN/openvswitch-2.10.1/lib/.libs/libopenvswitch.a
But i use the command:
./configure --with-ovs-srcdir=/home/mx/SDN/openvswitch-2.10.1 --with-ovs-libpath=/lib/ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
or command:
./configure --with-ovs-srcdir=/home/mx/SDN/openvswitch-2.10.1 --with-ovs-libpath=/usr/local/lib/ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
or command:
./configure --with-ovs-srcdir=/home/mx/SDN/openvswitch-2.10.1 --with-ovs-libpath=/home/mx/SDN/openvswitch-2.10.1/lib/.libs/ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
all get same error result:
configure: error: libopenvswitch.a was not found. Try --with-ovs-libpath
Please help me, thanks!
You need version 2.3.1 of Open vSwitch to build OF-CONFIG.
I can reproduce your issue if I try to install OF-CONFIG with the last version of Open vSwitch:
$ ./configure --with-ovs-srcdir=/ovs PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
...
configure: error: libopenvswitch.a was not found. Try --with-ovs-libpath
If I install Open vSwitch 2.3.1, however, everything works as expected:
$ wget http://openvswitch.org/releases/openvswitch-2.3.1.tar.gz
$ tar -xf openvswitch-2.3.1.tar.gz
$ cd openvswitch-2.3.1/
$ ./configure --prefix=/ --datarootdir=/usr/share
...
$ make -j && sudo make install -j
...
$ cd /of-config
$ ./configure --with-ovs-srcdir=/openvswitch-2.3.1 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
...
$ echo $?
0

Installation of sql relay fails

I just created a docker container and tried to install SQL Relay inside it.
I've checked the prerequisites here and followed the installation documents here.
However, at the end of make install of sqlrelay, I saw an error like this:
update-rc.d: /etc/init.d/sqlrelay: file does not exist
update-rc.d: /etc/init.d/sqlrcachemanager: file does not exist
make[1]: *** [install] Error 1
make[1]: Leaving directory `/sqlrelay-0.66.0/init'
make: *** [install-init] Error 2
What might be wrong with my installation?
Here's the docker file I used to start my installation:
FROM ubuntu:trusty
RUN apt-get update && \
apt-get install libxml2-dev libpcre3 libpcre3-dev libmysqld-dev -y
RUN apt-get install mysql-server libmysqlclient-dev -y
# sql relay prerequisites
RUN apt-get install g++ make perl php5-dev python-dev ruby-dev \
tcl-dev openjdk-7-jdk erlang-dev nodejs-dev node-gyp mono-devel \
libmariadbclient-dev libpq-dev firebird-dev libfbclient2 libsqlite3-dev \
unixodbc-dev freetds-dev mdbtools-dev -y
COPY rudiments-0.56.0.tar.gz /
COPY sqlrelay-0.66.0.tar.gz /
EXPOSE 80
Here are the outputs of ./configure, make, and make install inside sqlrelay-0.66.0 folder:
configure_log
make_log
make_install_log
If you need more information of my installation process, just let me know. I can provide it.
I think you should use ADD instead of COPY in your lines such as
COPY rudiments-0.56.0.tar.gz /
Your COPY just copies the .tar.gz, but does not unpack them
as with ADD
If the <src> parameter of ADD is an archive in a recognised compression format, it will be unpacked
This is extracted from
What is the difference between the `COPY` and `ADD` commands in a Dockerfile?
I have recently hit the same issue. The issue I found was that the init Makefile was incorrectly detecting the use of systemctl on Ubuntu Trusty and putting the scripts there. Later on the script would try to find the scripts in init.d and fail.
The solution is to edit the Makefile: sqlrelay-X.X.X/init/Makefile
Replace:
install:
if ( test -d "/lib/systemd/system" ); \
With:
install:
if ( test -d "/lib/systemd/system_x" ); \
Make a similar change to the uninstall option later in the script and it will now correctly install on Ubuntu.

Building a .deb package of Mono itself

I'm currently compiling the latest version of Mono from Github on an original version Raspberry Pi, on latest Raspbian.
This is a very time consuming process, which when it's complete I would not like to have to repeat.
Can the compiled Mono installation be packaged into a .deb to, for example, allow me to re-install latest Raspbian, then dpkg -i my-mono-build.deb?
Sure, and it's very easy to do if you choose the proper tool so that you don't need a master on debian packaging. As for me, I chose fpm to do exactly this. (Note: install via gem, not apt-get.)
And here you have an example of a script of how to build a Mono .deb with this, which I copy+paste here for posterity (just in case I delete the github repo by mistake, or github stops being a thing in the future):
#!/bin/bash
set -e
die () {
echo >&2 "$#"
exit 1
}
[ "$#" -eq 1 ] || die "Please specify the version of Mono you want to build as the argument. (Check the versions in the tarball list here: http://download.mono-project.com/sources/mono/)"
which fpm > /dev/null || (echo "Please install fpm (from gem, not apt-get)" && exit 1)
if mono --version > /dev/null 2>&1; then
echo "Mono is installed locally; please uninstall first" && exit 1
fi
WORK_DIR=/tmp/7digital-mono-work
rm -rf $WORK_DIR
mkdir $WORK_DIR
cd $WORK_DIR
MONO_VERSION=$1
MONO_DIR="mono-$MONO_VERSION"
SEVEND_VERSION="701"
MONO7D_VERSION=$MONO_VERSION'.'$SEVEND_VERSION
MONO7D_NAME="mono-7d"
echo "Downloading $MONO_VERSION"
wget http://download.mono-project.com/sources/mono/mono-$MONO_VERSION.tar.bz2
tar -jxf mono-$MONO_VERSION.tar.bz2
TARGET_DIR="$WORK_DIR/destdir"
mkdir $TARGET_DIR
cd "$WORK_DIR/$MONO_DIR"
./configure --prefix=/usr
make
make install DESTDIR="$TARGET_DIR"
cd $WORK_DIR
fpm -s dir \
-t deb \
-n $MONO7D_NAME \
-v $MONO7D_VERSION \
-C $TARGET_DIR \
-d "libglib2.0-dev (>= 0)" \
usr/bin usr/lib usr/share usr/include usr/etc
echo "Done. Your package should be ready in $WORK_DIR"

configure llvm fail. Host Clang must be able to find libstdcxx4.7 or newer

my project depends on llvm+clang+cmake.I use ninja to make compile simple.
my OS is : OS X Yosemite(10.10.5).here is how the error occurs.
1) get llvm&clang
$ mkdir ~/clang-llvm && cd ~/clang-llvm
$ git clone http://llvm.org/git/llvm.git
$ cd llvm/tools
$ git clone http://llvm.org/git/clang.git
$ cd clang/tools
$ git clone http://llvm.org/git/clang-tools-extra.git extra
2) install CMake and Ninja
$ cd ~/clang-llvm
$ git clone https://github.com/martine/ninja.git
$ cd ninja
$ git checkout release
$ ./bootstrap.py
$ sudo cp ninja /usr/bin/
$ cd ~/clang-llvm
$ git clone git://cmake.org/stage/cmake.git
$ cd cmake
$ git checkout next
$ ./bootstrap
$ make
$ sudo make install
3)compile ninja
$ cd ~/clang-llvm
$ mkdir build && cd build
$ cmake -G Ninja ../llvm -DLLVM_BUILD_TESTS=ON # Enable tests; default is off.
$ ninja
$ ninja install
4)config clang
$ cd ~/clang-llvm/build
$ ccmake ../llvm
after that , I get into the advanced mode (by press t)
CMAKE_CXX_COMPILER:*I change it to clang++*
CMAKE_C_COMPILER:*I change it to clang*
LLVM_ENABLE_EH and LLVM_ENABLE_RTTI: *I change it from OFF to ON*
and then I press c to configure. error happens.ERROR is :
**CMake Error at cmake/modules/HandleLLVMOptions.cmake:43 (message):
Host Clang must be able to find libstdc++4.7 or newer!
Call Stack (most recent call first):
CMakeLists.txt:358 (include)**
Any ideas?
Thanks

Bash Unexpected End of File Error After Installing RVM

I executed the following commands under BASH to install RVM:
brew install gnupg gnupg2
gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
\curl -sSL https://get.rvm.io | bash
Now, when I open my terminal, I receive the following error message:
-bash: eval: line 19: syntax error: unexpected end of file
Here is my .bash_profile:
export PATH=/usr/local/bin:$PATH
eval "$(rbenv init -)i"
alias sbl='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl'
#changes prompt to be colorized and rearranges prompt to be "username#hotname:cwd $"
export PS1="\[\033[36m\]\u\[\033[m\]#\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
#enable command line colors, and define colors for the ‘ls’ command
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
#flags -G colorizes output, -h makes sizes human readable, and -F throws a / after a directory
alias ls='ls -GFh'
#Need to add below after 'brew install git bash-completion'
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
Can someone point out what is causing the error? I am not familiar with BASH programming. RVM is working.
It looks to me like you have a stray "i" at the end of the second line:
eval "$(rbenv init -)i"
Because of that, eval is trying to run a command sequence that looks something like this:
export PATH="/Users/pc3sq/.rbenv/shims:${PATH}"
# [...]
rbenv() {
# [...]
}i
...and since "}i" is not a valid match for the "{" that starts the function definition, eval runs into the end of the "file" (actually just a string) while it's still looking for a "}" to close the function definition.