usdot-fhwa-OPS / V2X-Hub

V2X Hub is a message handler that acts as a translator and data aggregator/disseminator for infrastructure components of a connected vehicle deployment.
Apache License 2.0
120 stars 67 forks source link

Error in installation of V2X-HUB in Ubuntu 18.04 #389

Closed hypophyse00 closed 2 years ago

hypophyse00 commented 2 years ago

Types of Issue

i am triying to install in Ubuntu 18.04.6 V2X-Hub/[docs]/Installation_and_Setup.md

Descriptive summary

I did all the Compilation Instructions but i have a problem during the last one. which is the following one :

'This will create a bin directory that contains the plugin executable, as well as a directory for each plugin. However, a V2X Hub plugin must be packaged in a ZIP file to be installed to a system. In order to package up any one of the plugins from the v2i-hub directory, do the following:

$ ln -s ../bin /bin $ zip .zip /bin/ /manifest.json '

V2XHUB version where this issue was discovered

V2X-HUB Develop

Expected behavior

Actual behavior

when i do : ln -s ../bin /bin it tells me : bash: PluginName: No such file or directory

so i tried to put a PluginName like : ln -s ../bin LocationPlugin/bin then it tells me : ln: failed to create symbolic link 'LocationPlugin/bin': No such file or directory

Steps to reproduce the actual behavior

' To Compile the V2X Hub software, run the following commands from V2X-Hub directory.

$ cd src/tmx $ cmake . $ make $ sudo make install

The library path to the new libraries needs to added to the LD_LIBRARY_PATH variable for the libraries to be found. This can be done in a per session basis with the command line.

$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

When the unit is rebooted this variable will not be set. To add the path at bootup modify the correct file in the /etc/ld.so.conf.d/ directory and add a line with the path “/usr/local/lib/”. For an Intel 64 bit system the correct file is “x86_64-linux-gnu.conf” but this will vary based on your platform. After the file is modified run this command to update the paths.

$ sudo ldconfig

The V2X Hub supplied plugins have a dependency on a version of libwebsockets that is newer than the installable package that comes with Ubuntu. Hence a custom version of the software has benn forked and made available with V2X-Hub. Run the following commands from V2X-Hub directory.

$ cd ext/libwebsockets $ cmake -DLWS_WITH_SHARED=OFF . $ make $ sudo make install

The new libwebsockets static library should now be available in /usr/local to build against.

An OPENAPI based Qt webservice is needed by the plugins for http requests processing. A custom generated code using OPENAPI framework is available through the V2X-Hub repo and is located in “ext/server" folder. To compile the web service as a shared library following steps are to be taken:

$ cd ext/ $ git clone https://github.com/nitroshare/qhttpengine.git $ cd qhttpengine $ cmake . $ make $ sudo make install

$ cd ext/server $ cmake . $ make $ sudo make install

Googletest is another utility used by the V2X-hub for unit tests. Here are the steps to install googletest. The googletest application has to be installed in the prerequisite step first before proceeding.

$ cd /usr/src/googletest/googletest $ sudo mkdir build $ cd build $ sudo cmake .. $ sudo make $ sudo cp libgtest* /usr/lib/ $ cd .. $ sudo rm -rf build

$ sudo mkdir /usr/local/lib/googletest $ sudo ln -s /usr/lib/libgtest.a /usr/local/lib/googletest/libgtest.a $ sudo ln -s /usr/lib/libgtest_main.a /usr/local/lib/googletest/libgtest_main.a

Now, run the following commands from V2X-Hub directory.

$ cd src/v2i-hub $ cmake . -DqserverPedestrian_DIR=/usr/local/share/qserverPedestrian/cmake $ make '

Related work

thanking you in advance for your help

jwillmartin commented 2 years ago

@hypophyse00 These instructions are for installing locally. If you'd rather install using Docker, follow these instructions: https://usdot-carma.atlassian.net/wiki/spaces/V2XH/pages/1886158849/V2X-Hub+Docker+Deployment

For this issue, you'll have to run the following command from ~/V2X-Hub/src/v2i-hub/ : ln -s ../bin LocationPlugin/bin

This command requires the bin directory to exist. You should see ~/V2X-Hub/src/v2i-hub/bin/

hypophyse00 commented 2 years ago

thank your for your help. i tried with docker and now after installing docker engine and docker compose, V2X and mysql do 'restarting again' i didn't understand why

jwillmartin commented 2 years ago

@hypophyse00 You might have a newline character or space in your password files in the secrets folder. You can edit the files in VS Code to remove the newline or use these commands: echo -n $(tr -d '\n' < mysql_password.txt) > mysql_password.txt echo -n $(tr -d '\n' < mysql_root_password.txt) > mysql_root_password.txt

You'll have to reinstall the containers after doing this.

hypophyse00 commented 2 years ago

it`s okay thank you for your help