cygwin link generated from sdkman not recognized in windows 7 - cygwin

I am trying to use sdkman to manage versions of Groovy/etc on a Windows 7 box. All is fine when using a cygwin command prompt, but I want the Windows GROOVY_HOME set to the current. To do this, I have tried setting the CYGWIN environment variable to:
export CYGWIN=winsymlinks:native
export CYGWIN=winsymlinks
The CYGWIN doc seems to indicate that first method for defining links is appropriate, and that the second is more of a fallback. Changing the variable does indeed result in a different link - neither of which works in Windows 7.
The following is my current CYGWIN state.
[~]➔ echo $CYGWIN
winsymlinks
[~]➔ sdk default groovy 2.3.6
Default groovy version set to 2.3.6
[~]➔ groovy -version
Groovy Version: 2.3.6 JVM: 1.8.0_31 Vendor: Oracle Corporation OS: Windows 7
[~]➔ uname
CYGWIN_NT-6.1
[~]➔ uname -r
2.4.1(0.293/5/3)
Current Windows settings:
C:\Users\uc164033>echo %GROOVY_HOME%
C:\Users\uc164033\local\bin\cygwin64\home\uc164033\.sdkman\candidates\groovy\current
C:\Users\uc164033>cd %GROOVY_HOME%
The system cannot find the path specified.
C:\Users\uc164033\local\bin\cygwin64\home\uc164033\.sdkman\candidates\groovy>dir
Volume in drive C is OSDisk
Volume Serial Number is 7E0E-38C5
Directory of C:\Users\uc164033\local\bin\cygwin64\home\uc164033\.sdkman\candidates\groovy
03/29/2016 10:50 AM <DIR> .
03/29/2016 10:50 AM <DIR> ..
07/28/2014 03:28 PM <DIR> 2.3.6
07/09/2015 08:58 PM <DIR> 2.4.4
02/18/2016 10:16 PM <DIR> 2.4.6
03/29/2016 10:22 AM 1,285 current.lnk
1 File(s) 1,285 bytes
5 Dir(s) 896,974,188,544 bytes free
I can live with this as is, but sure would like to make my life simpler being that I cannot run on a Mac nor a Linux machine.

Related

nuget package for selenium webdriver MSEdgeDriver version 89.0 is missing linux binaries

I am using the following version of the webdriver. . .
Selenium.WebDriver.MSEdgeDriver --version 89.0.774.54
My code was working well in macOS, but attempting the build the project in a Linux docker container fails for me. Upon further investigation, I saw that the nuget package does not have a folder for linux,
/root/.nuget/packages/selenium.webdriver.msedgedriver/89.0.774.54/driver:
total 20
drwxr-xr-x 5 root root 4096 Apr 7 10:16 .
drwxr-xr-x 5 root root 4096 Apr 7 10:16 ..
drwxr-xr-x 2 root root 4096 Apr 7 10:16 mac64
drwxr-xr-x 2 root root 4096 Apr 7 10:16 win32
drwxr-xr-x 2 root root 4096 Apr 7 10:16 win64
I do not see any Linux folder here. Also, the exact command that fails during a dotnet build is the following. . .
chmod: cannot access '/root/.nuget/packages/selenium.webdriver.msedgedriver/89.0.774.54/build/../driver//msedgedriver': No such file or directory
apparently, the project restores step in the build is unable to locate the right driver. that // at the end of the path feels like the build process does not even know how to identify the correct driver folder (macOS/win32/win64) since Linux is not there.
How does one fix this?
I've checked the package folder and indeed it doesn't contain Edge driver for Linux.
I suggest that you can download Edge WebDriver for Linux directly on this page. Please note that not every version has Linux version, the latest version for Linux is 90.0.810.1. Another version for Linux I found is 88.0.692.0.
You can also try to find if there're other versions for Linux and find the one which is suitable for you. Then you can try to test Edge automation on Linux with that WebDriver.

Execute code in red hat 4

I have an ec2 instance in redhat 4.
Linux version 4.4.41-36.55.amzn1.x86_64 (mockbuild#gobi-build-60008) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Wed Jan 18 01:03:26 UTC 2017
I'm trying to execute a code made in matlab 2015b I have the m file.
So first I installed the MCR with unziping mat and executing ./install and later I add the environment variables :
LD_LIBRARY_PATH=/usr/local/MATLAB/MATLAB_Runtime/v90/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v90/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v90/sys/os/glnxa64:
MATLAB=/usr/local/MATLAB/MATLAB_Runtime/v90
to my bashrc
So next I wanted to do is execute the m file but in /usr/local/MATLAB/MATLAB_Runtime/v90/bin there is no matlab script.
Reading a little what I need to do is this post: https://hpc.nih.gov/apps/Matlab_compiler.html but When I tried to execute : module load matlab/v90 says module commantd not found
I try this: https://ask.fedoraproject.org/en/question/59399/module-command-not-found-in-fedora-21/ Adding ". /etc/profile" to my .bashrc but seems not to work.
So three questions
How can I run this file .m file, what are the steps for 2015b in
linux 64 bit?
How to get module command working on redhat 4?
For the question 2, I have insmod and modprobe in /sbin/ folder...
are this related to add matlab?
module command here refers to the Environment modules software and not the Linux kernel modules. You should be able to install module on your system by following the installation documentation provided.

Cannot install a new version of Java on linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
The java version on the server was 1.6.0_37, I used yum install java-1.7.0-openjdk to install Java-1.7 but after using this command when I used java -version the version of Java is still 1.6.0. How to change it to 1.7?
# yum install java-1.7.0-openjdk
java -version
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
I also followed following steps but java version is still 1.6.0_37
Downloading Latest Java Archive
Java latest archive is available on its official site. We recommend to download latest version of Java from Oracle official website.
For 64 Bit:-
# cd /opt/
# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u75-b13/jdk-7u75-linux-x64.tar.gz"
For 32 Bit:-
# cd /opt/
# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u75-b13/jdk-7u75-linux-i586.tar.gz"
Note: In any case if above command failed to download and you need to download java through Linux terminal, watch below screen cast ( http://screencast.com/t/wf9bQ0XjDPxT ), You are required a graphical browser.
After completing download, Extract archive using following command. Use archive file as per your system configuration. For this example we are using CentOS 6.6 (64 bit) system.
# tar xzf jdk-7u75-linux-x64.tar.gz
Install Java with Alternatives
After extracting Java archive file, we just need to set up to use newer version of Java using alternatives. Use the following commands to do it.
# cd /opt/jdk1.7.0_75/
# alternatives --install /usr/bin/java java /opt/jdk1.7.0_75/bin/java 2
# alternatives --config java
There are 4 programs which provide 'java'.
Selection Command
-----------------------------------------------
* 1 /usr/lib/jvm/jre-1.6.0-openjdk/bin/java
+ 2 /opt/jdk1.7.0_60/bin/java
3 /opt/jdk1.7.0_72/bin/java
4 /opt/jdk1.7.0_75/bin/java
Enter to keep the current selection[+], or type selection number: 4 [Press Enter]
Now you may also required to set up javac and jar commands path using alternatives command.
# alternatives --install /usr/bin/jar jar /opt/jdk1.7.0_75/bin/jar 2
# alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_75/bin/javac 2
# alternatives --set jar /opt/jdk1.7.0_75/bin/jar
# alternatives --set javac /opt/jdk1.7.0_75/bin/javac
Check Installed Java Version
Use following command to check which version of Java is currently being used by system.
# java -version
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)
Configuring Environment Variables
Most of Java based application’s uses environment variables to work. Use following commands to set up these variable properly. It’s also good to add following commands to any start-up script like ~/.bashrc or ~/.bash_profile.
Setup JAVA_HOME Variable
# export JAVA_HOME=/opt/jdk1.7.0_75
Setup JRE_HOME Variable
# export JRE_HOME=/opt/jdk1.7.0_75/jre
Setup PATH Variable
# export PATH=$PATH:/opt/jdk1.7.0_75/bin:/opt/jdk1.7.0_75/jre/bin
I also used following but still shows previous version
root#server [/]# yum search java | grep -i --color JDK
ldapjdk-javadoc.x86_64 : Javadoc for ldapjdk
icedtea-web.x86_64 : Additional Java components for OpenJDK - Java browser
java-1.6.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.6.0-openjdk-demo.x86_64 : OpenJDK Demos
java-1.6.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.6.0-openjdk-javadoc.x86_64 : OpenJDK API Documentation
java-1.6.0-openjdk-src.x86_64 : OpenJDK Source Bundle
java-1.7.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.7.0-openjdk-demo.x86_64 : OpenJDK Demos
java-1.7.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.7.0-openjdk-javadoc.noarch : OpenJDK API Documentation
java-1.7.0-openjdk-src.x86_64 : OpenJDK Source Bundle
java-1.8.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.8.0-openjdk-demo.x86_64 : OpenJDK Demos
java-1.8.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.8.0-openjdk-headless.x86_64 : OpenJDK Runtime Environment
java-1.8.0-openjdk-javadoc.noarch : OpenJDK API Documentation
java-1.8.0-openjdk-src.x86_64 : OpenJDK Source Bundle
ldapjdk.x86_64 : The Mozilla LDAP Java SDK
root#server [/]# yum install java-1.7.0-openjdk java-1.7.0-openjdk-devel
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.hyve.com
* extras: centos.hyve.com
* updates: centos.hyve.com
Package 1:java-1.7.0-openjdk-1.7.0.75-2.5.4.0.el6_6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package java-1.7.0-openjdk-devel.x86_64 1:1.7.0.75-2.5.4.0.el6_6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository
Size
================================================================================
Installing:
java-1.7.0-openjdk-devel x86_64 1:1.7.0.75-2.5.4.0.el6_6 updates 9.4 M
Transaction Summary
================================================================================
Install 1 Package(s)
Total download size: 9.4 M
Installed size: 36 M
Is this ok [y/N]: y
Downloading Packages:
java-1.7.0-openjdk-devel-1.7.0.75-2.5.4.0.el6_6.x86_64.r | 9.4 MB 00:03
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : 1:java-1.7.0-openjdk-devel-1.7.0.75-2.5.4.0.el6_6.x86_64 1/1
Verifying : 1:java-1.7.0-openjdk-devel-1.7.0.75-2.5.4.0.el6_6.x86_64 1/1
Installed:
java-1.7.0-openjdk-devel.x86_64 1:1.7.0.75-2.5.4.0.el6_6
Complete!
root#server [/]# ls -l /usr/lib/vim
/bin/ls: cannot access /usr/lib/vim: No such file or directory
root#server [/]# ls -l /usr/lib/jvm/
total 12
drwxr-xr-x 3 root root 4096 Feb 6 00:03 ./
drwxr-xr-x 28 root root 4096 Feb 5 22:47 ../
lrwxrwxrwx 1 root root 32 Feb 6 00:03 java-1.7.0 -> /etc/alternatives/java_sdk_1.7.0/
drwxr-xr-x 7 root root 4096 Feb 6 00:03 java-1.7.0-openjdk-1.7.0.75.x86_64/
lrwxrwxrwx 1 root root 34 Feb 6 00:03 java-1.7.0-openjdk.x86_64 -> java-1.7.0-openjdk-1.7.0.75.x86_64/
lrwxrwxrwx 1 root root 34 Feb 6 00:03 java-openjdk -> /etc/alternatives/java_sdk_openjdk/
lrwxrwxrwx 1 root root 21 Feb 5 23:52 jre -> /etc/alternatives/jre/
lrwxrwxrwx 1 root root 27 Feb 5 22:47 jre-1.7.0 -> /etc/alternatives/jre_1.7.0/
lrwxrwxrwx 1 root root 38 Feb 5 22:47 jre-1.7.0-openjdk.x86_64 -> java-1.7.0-openjdk-1.7.0.75.x86_64/jre/
lrwxrwxrwx 1 root root 29 Feb 5 22:47 jre-openjdk -> /etc/alternatives/jre_openjdk/
root#server [/]# vim .bashrc
root#server [/]# java -version
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
root#server [/]# cd $HOME
root#server [~]# vim .bashrc
Content of .bashrc
# .bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
export JAVA_HOME="/usr/lib/jvm/jre-1.7.0-openjdk.x86_64"
Currently the outpur of .bashrc is as following but same version of Java is still being used
# .bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
export JAVA_HOME="/usr/lib/jvm/jre-1.7.0-openjdk.x86_64"
export PATH=$PATH:$JAVA_HOME\bin
I usually install jdk to Linux and got the issue like yours.
I solve by editing ~/.bash_profile file:
JAVA_HOME=/opt/jdk1.7.0_75
#this should be point to your jdk directory
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
Note: note that you put $JAVA_HOME/bin before $PATH when re-define PATH
Then, run below command to reload your .bash_profile file
. ~/.bash_profile
Then you can reopen your Terminal and check your Java version.
I achieved the same by appending the following contents to /etc/profile in CentOS 7. Also, I replaced my openjdk with Oracle's official JDK-8,but,that doesn't matter in actual sense here.
I suggest you to do the changes as I've done here in /etc/profile file. Replace the actual path/location depending on your system's location where java is installed :-
export JAVA_HOME=/usr/java/default
# point location before Java's bin folder in your system
export JRE_HOME=/usr/java/default/jre
# point location before JRE's bin folder in your system
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
# append those 2 locations to the PATH environment variable
Where JAVA_HOME was the path upto installed Java's /bin directory as you can notice from the 1st export command above, JRE_HOME was the path upto JRE's /bin directory as you can notice from the 2nd export command above.

Unable to use the Linux service to start Archiva 2.1.0

I'm trying to start the recently published Apache Archiva v2.1.0 (Standalone) on Linux.
For testing purpose, the zip has been uncompressed in /opt/archiva-2.0.
The docs says:
http://archiva.apache.org/docs/2.1.0/adminguide/standalone.html
On Linux, the bin/archiva script is suitable for linking or copying to
/etc/init.d/archiva and running as root, as long as the RUN_AS_USER
environment variable is set within the script.
So I've copied the /opt/archiva-2.0/bin/archiva Shell script in /opt/init.d.
I tried with both:
#RUN_AS_USER=root
and
RUN_AS_USER=root
but I always get the same error at startup:
>service archiva console
/etc
Unable to locate any of the following operational binaries:
/etc/rc.d/init.d/./wrapper-linux-x86-64
/etc/rc.d/init.d/./wrapper-linux-x86-32
/etc/rc.d/init.d/./wrapper
For information:
>uname -a
Linux ****** 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
Any idea?
Making symbolic link of the bin/archiva script to /etc/init.d/archiva works better and that way the script is just in one place.
$ ln -s /opt/archiva-2.0/bin/archiva /etc/init.d/archiva

Problems restarting Apache Server

Well, I'm having some problems restarting my Apache Server. I modified the ulimit on the server but I'm failing to restart httpd;
I'm running the server on CentOS 5.8 x64. The output from httpd -V:
Server version: Apache/2.2.3
Server built: Jan 10 2013 08:19:28
Server's Module Magic Number: 20051115:3
Server loaded: APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture: 64-bit
The error I'm getting when running /sbin/service httpd restart(I'm not going to print the hall output):
Syntax error on line 210 of /etc/httpd/conf/httpd.conf:
Syntax error on line 6 of /etc/httpd/conf.d/php.conf:
Cannot load /etc/httpd/modules/libphp5.so into server: libidn.so.11:
wrong ELF class: ELFCLASS32
I googled this error and tried to dig for the problem. What I found is that libphp5.so is 64-bit architecture whilst libidn.so.11 is 32-bit. Normally, as I know, there shouldn't be a problem using 32-bit programs on 64-bit architecture, but in this case there's 32-bit library used in 64-bit program(****See this related question**).
I tried to install the 64-bit version of the library but what I could find, for my O.S.(centOS 5.8) is the libidn_x86_64 version, which is again on 32-bit.
Programs installed on server:
squid - Proxy
ffmpeg - for video streaming
csf-lfd -> firewall
Apache
Any help on finding the problem is appreciated!
Since the version of libidn in CentOS 5.1 is the same as in 5.9 (indeed it's the same file), it's probably a safe bet that it will install in 5.8
could find, for my O.S.(centOS 5.8) is the libidn_x86_64 version, which is again on 32-bit.
No, the name implies it's the 64 bit version - if it contains a 32 bit object file, then something has gone way wrong - further, given the wide usage of CentOS and that libidn is required for all sorts of things, I'm sure someone would have noticed by now if the rpm contained the wrong file.
You might want to spend some time thinking about how your server got into this state. It shouldn't have been possible to install/upgrade the PHP from Centos respoitories with the right dependencies in place (unless you forced it to ignore them).

Resources