I am trying to install dataloader on my Linux machine.
https://github.com/forcedotcom/dataloader
There is a command line on third line:
$ mvn clean package -DskipTests
When I typed that in, I got this error:
The program 'mvn' can be found in the following packages:
* maven
* maven2
Try: sudo apt-get install <selected package>
I am not sure what to do.
Dataloader needs Maven. It's a dependency manager for Java.
Thus you have to install Maven before being able to use it.
Just run sudo apt-get update && sudo apt-get install maven2 and mvn will be available on your computer.
Maven documentation (for more up to date installation instructions) : https://maven.apache.org/install.html
Related
In my gitlab-ci.yml configuration I have the following snippet:
before_script:
- java -jar /home/gitlab-runner/tools/ciVersioner-1.0.jar $MAJOR $MINOR $CI_COMMIT_SHORT_SHA
script:
- mvn --projects employees --also-make clean package -DskipTests
after_script:
- echo $HOSTNAME $WHOAMI
artifacts:
paths:
- employees/target/*.jar
expire_in: 30 days
It does not work but for a different reason (since java versions are incompatible).
Here's the output:
The solution was to install a newer java 11.
I did so and changed the configuration correspondingly:
before_script:
- /opt/java11/jdk-11/bin/java -jar /home/gitlab-runner/tools/ciVersioner-1.0.jar $MAJOR $MINOR $CI_COMMIT_SHORT_SHA
script:
- mvn --projects employees --also-make clean package -DskipTests
after_script:
- echo $HOSTNAME $WHOAMI
artifacts:
paths:
- employees/target/*.jar
expire_in: 30 days
However, with this configuration nothing works at all:
But if I execute this command in VM environment directly, it works as expected.
Is there a limitation on using full qualified path in the yml file or maybe it has to do with something else?
Before you updated java the job fail at the java command, so it didn't try to execute mvn.
However, when the first problem is solved, you get a new issue and now with mvn command.
I guess the runner cannot recognize mvn because maven is not installed.
You could try adding the following to the before_script section:
- apt-get update && apt-get install maven
This is will depend on the linux distribution, use yum instead if the runner is on redhat or centos
I am running my automation test project in Gitlab pipeline. I am getting the exception as "java.lang.UnsatisfiedLinkError: /usr/local/openjdk-8/jre/lib/amd64/libawt_xawt.so: libXrender.so.1: cannot open shared object file: No such file or directory"
I tried multiple solution for installing and updating the packages but no luck
Tried solutions :
dpkg --add-architecture i386
apt-get update
apt -y install libxext6
apt-get -y install libbz2-1.0:i386 libxrender1:i386 libxtst6:i386 libxi6:i386
apt-get -y install libxrender1 libxtst6 libxi6
could you please suggest?
After running java -jar languagetool.jar I received the same error as your question mentions:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-11-openjdk-amd64/lib/libawt_xawt.so
Based on this similar question, I tried:
sudo apt-get install -y openjdk-6-jre
Which returned:
Reading package lists... Done Building dependency tree Reading
state information... Done Package openjdk-6-jre is not available, but
is referred to by another package. This may mean that the package is
missing, has been obsoleted, or is only available from another source
However the following packages replace it: icedtea-netx
E: Package 'openjdk-6-jre' has no installation candidate
Hence, I tried:
sudo apt-get install -y icedtea-netx
And that resolved the error.
Are you trying to build the native lib (creating the .so file in the fly) or trying to make use of the pre-built version of it? In the first case, make sure your test-automation tool supports it; in the second case, make sure the presence of your lib file in the appropriate location.
You are probably encountering this error because you do not have the libawt_xawt.so package in your /usr/local/openjdk-8/jre/lib/amd64/ directory.
To fix the problem, follow these steps:
1- Update the package index:
sudo apt-get update
2- Install openjdk-11-jre deb package:
sudo apt-get install openjdk-11-jre
source here.
I have to run Django CRM in my local machine. I followed all commands and tried to install every dependency.
I got stuck in the following command.
sudo apt-get install oracle-java8-installer -y java -version
I got the following error when I tried above command.
E: Command line option 'e' [from -version] is not understood in combination with the other options.
The link of Github CRM Django CRM
Documentation
Please someone help me.
Looking to Django-CRM documentation, seems like the command to install java (required by elasticsearch dependency) it's not the correct one for ubuntu 18.04
To install it you need to run:
apt-get install openjdk-8-jre-headless
Then you can follow the instructions as in the documentation
wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch > key.elastic
apt-key add key.elastic
echo "deb https://packages.elastic.co/elasticsearch/2.x/debian stable main" | tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list
apt-get update && apt-get install elasticsearch -y
Also, remember to add sudo on the commands if you are not running the commands as root
In one folder I have two files: Dockerfile and postgresql-42.2.4.jar
Dockerfile:
from ubuntu:16.04
RUN apt-get update && apt-get install -y \
libreoffice-base
COPY postgresql-42.2.4.jar postgresql-42.2.4.jar
CMD ["usr/bin/libreoffice"]
postgresql-42.2.4.jar:
I downloaded PostgreSQL JDBC archive from PostgreSQL official site
To run docker I used:
docker build -t gui-app .
then:
docker run --net=host --env="DISPLAY" --volume="$HOME/.Xauthority:/root/.Xauthority:rw" gui-app
Libre Office run correctly, but when I want to add Class Path (link to Libre help site) I can't find .jar file which I copied in Dockerfile.
I didn't manually install JRE, but I think JRE is build in ubuntu.
Why I can't find JDBC archive file?
There is no JRE installed by default in the docker image ubuntu:16.04. You can inspect the list of installed packages by running:
docker run -it ubuntu:16.04 apt list
You can install the default JRE in your Dockerfile by adding the default-jre package:
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y \
libreoffice-base default-jre
COPY postgresql-42.2.4.jar postgresql-42.2.4.jar
CMD ["usr/bin/libreoffice"]
I get an error on Core.NATIVE_LIBRARY_NAME like so:
Stacktrace:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
NATIVE_LIBRARY_NAME cannot be resolved or is not a field
at MyVideoCap.main(MyVideoCap.java:7)
I had settled the NativLibrary path at the following location.
/home/.../OpenCV/opencv-2.4.5/build/lib
I had followed the instruction on https://www.openshift.com/blogs/day-12-opencv-face-detection-for-java-developers but it doesn't creates any opencv2.4.9.jar file I am working on ubuntu 12 and eclipse with opencv api suppoert.
so help me if you can to generating and building the jar file in the build directory in ubuntu. thanks in advance...
Here I found the full Installing progress of the OpenCV...
# install basic development environment
sudo apt-get install build-essential cmake pkg-config
# install opencv dependencies. ubuntu 13.04 ships with opencv which is close enough to 2.4.6 to pull in most of the needed dependencies.
sudo apt-get build-dep libopencv-dev
# additional dependencies for java support
sudo apt-get install default-jdk ant
# compile opencv
tar xzvf opencv-2.4.6.1.tar.gz
cd opencv-2.4.6.1
mkdir build; cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON ..
make
sudo make install
And in last don't forget to set Native library path to the
/home/.../opencv-2.4.6.1/build/lib
Thats it...