Can't init Scala Gradle project: -bash: gradle/gradle-5.2.1/bin/gradle: No such file or directory - scala

I just installed Gradle, manually by downloading the zip and then unzipping it, and verified it installed fine with gradle -v .
I have it located at Users/username/gradle/ . I set it on the home path for linux by running this line:
export PATH=$PATH:gradle/gradle-5.2.1/bin/
However, when I try to init my first Scala project, I run this command:
gradle init --type scala-library
However, it complains that:
-bash: gradle/gradle-5.2.1/bin/gradle: No such file or directory
So fine, I check my directory structure, and that file is definitely in there. What gives?

You should check whether gradle file exists and is an executable ls -l gradle/gradle-5.2.1/bin/gradle. Also if Users/gradle/ means user's home directory shouldn't your path be something like $PATH:$HOME/gradle/gradle-5.2.1/bin/ ?

Related

- amnuts/opcache-gui 2.5.4 requires ext-zend-opcache * -> it is missing from your system

I'm trying to run 'composer install' command on root directory of existing project, but when I run this command it's giving 'ext-zend-opcache' missing error.enter image description here
I've enabled zendextension in php.ini file Php.ini file screen shot, and to verify whether it has enabled or not I've run 'php -v' in command prompt which is saying 'failed loading php_opcache.dll' Php -v Command Prompt screen shot
I'm using xampp v3.2.2 because php 7.2 was required to run project which was mentioned in composer.json file of project.

Bazel 0.29.1 LLVM-7.0 on Centos 7

So I have a docker with CentOS 7 which has installed bazel.
I've installed devtoolset-8, llvm-toolset-7.0 and centos-release-scl.
I've also installed bazel 0.29.1 and made.
export CC=clang
export CXX=clang++
I have an shell script which run basel. Befor bazel build command in top of the script I have
source /opt/rh/llvm-toolset-7.0/enable
which enables LLVM-7.0/Clang-7.0. But build failes with:
/opt/rh/llvm-toolset-7.0/root/usr/bin/clang: error while loading
shared libraries: libLLVM-7.so: cannot open shared object file: No
such file or directory
But this lib exists! It's in /opt/rh/llvm-toolset-7.0/root/usr/lib64/
May someone pls help with this ?
Add below to .bash_profile or .bashrc:
source /opt/rh/llvm-toolset-7.0/enable
export CC=/opt/rh/llvm-toolset-7.0/root/usr/bin/clang
export CXX=/opt/rh/llvm-toolset-7.0/root/usr/bin/clang++
Run below as Root
echo /opt/rh/llvm-toolset-7.0/root/usr/lib64/ > /etc/ld.so.conf.d/llvm-toolset.conf
ldconfig

sbt command not found

I am installing sbt in my cloudera distribution.
I have downloaded sbt.0.13.15
Moved file to /usr/local
Then I had updated profile
sudo nano profile
Added export PATH=$PATH:/usr/local/sbt/bin
Saved file and exited.
But now if I issue "sbt about" command, I am getting sbt: command not found.
Could you please help to resolve this issue.
Some suggestions:
Check your PATH variable: echo $PATH
The PATH variable is not updated automatically by writing into .profile, either open a new shell or do source .profile
The file is called .profile, not profile

CMake install directory permission

I have built a project using cmake (LLVM project) and tried to install it by issuing the following command:
$ cmake3 --build . --target install
If I run it using root then there is no problem and the files will be installed under the directory /usr/local/.
My problem is when I want to install the project using normal user.
I get the following error:
CMake Error at cmake_install.cmake:36 (file):
file INSTALL cannot set permissions on "/usr/local/include/llvm"
I have changed the permission of directory /usr/local/ to 777 recursively, and their ownership to root:wheel and I added my normal user to group wheel. But I still cannot install the files into the /usr/local/ directory.
The main issue is about building project in Eclipse which fails at "Build Install" command.
chmod 777 -R / is a very scary command. I've destroyed a system once by doing that.
The philosophy I use for this is:
If I need to deploy something through my IDE to debug or test before packaging, I deploy it locally within my home directory.
I only install stuff to my system (outside of home) if it has been packaged first (*.deb, *.rpm, *.tar.gz) so that I can remove it without problems.
For me, I do this with:
cmake $src
cmake --build . --target install -- DESTDIR=stage
This will configure my project, make it, then install it locally in a folder called ./stage which resides in my build directory. I can then run my executable from ./stage/usr/bin. Note that this only works if make is your generator.
Once I've tested it and I'm happy, I package it and deploy to my system or upload to a repository:
cpack
sudo dpkg -i <package>.deb
We should use USE_SOURCE_PERMISSIONS in our install function.
Example:
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/Release/" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" USE_SOURCE_PERMISSIONS)

Building spark-jobserver Using SBT and Scala

Can anyone suggest me a better documentation about spark-jobserver. I have gone through the url spark-jobserver but unable to follow the same. It will be great if some one explain step by step instruction on how to use spark-jobserver.
Tools used in building the project.
sbt launcher version 0.13.5
Scala code runner version 2.11.6
With the above mentioned tools I am getting errors while building the spark-jobserver.
The documentation provided in the jobserver repo is indeed confusing.
Here's the steps I followed to manually build and run Spark Job Server on a local machine.
1. git clone https://github.com/spark-jobserver/spark-jobserver
2. sudo mkdir -p /var/log/job-server
3. sudo chown user1:user1 /var/log/job-server
4. cd spark-jobserver
5. sbt job-server/assembly
6. cd config
7. cp local.sh.template abc.sh # Note that the same name 'abc' is used in steps 8 and 10 as well
8. cp ec2.conf.template abc.conf
9. cd .. # The jobserver root dir
10. ./bin/server_package.sh abc # This script copies the files and packages necessary to run job server into a single dir [ default - /tmp/job-server]
11. cd /tmp/job-server [This is where the files and packages necessary to run job server are published by default]
12. ./server_start.sh
13. Run ./server_stop.sh to stop the server
Hope this helps
Here are the steps that I used to install:
Clone the jobserver repo.
Get sbt using wget https://dl.bintray.com/sbt/native-packages/sbt/0.13.8/sbt-0.13.8.tgz
Move "sbt-launch.jar" in sbt/bin to /bin
Create a script /bin/sbt, contents found here, making sure to change the pointer to java if necessary
Make the above script executable
Now cd into the spark jobserver directory, and run sbt publish-local
Assuming the above was successful, run sbt in the same directory
Finally, use the command re-start, and if it succeeds the server is now running!