How to install SDKMAN on FreeBSD 12 RELEASE? - freebsd

I'm trying to install SDKMAN package manager on a FreeBSD machine.
I successfully executed:
curl -s "https://get.sdkman.io" | bash
The problem occurs when I am trying to run:
source "/root/.sdkman/bin/sdkman-init.sh"
I got the following error in the terminal:
Illegal variable name.

FreeBSD doesn't have bash by default, so you're probably running different shell. Try running bash first to enter bash prompt and then run that source ... command.

Related

How would you properly install MATLAB in ubuntu that is running on WSL2?

I want to install matlab in ubuntu 20.04, but I'm running ubuntu in WSL2 and it doesn't want to work.
I keep getting the error: terminate called after throwing an instance of 'framework::window::DisplayError what(): No. Display Avaliable.
I have the linux version of matlab unzipped in a folwer and I'm trying to instal it into the user files. Things I've tried to install it that were suggested for people having the same issue on other distros:
sudo ./install
./install
bash install
install
bash ./install
sudo bash ./install
sudo su and then doing ./install
export DISPLAY=:0.0 and then sudo ./install
bash ./install -v -inputFile installer_input.txt
It gives the same error for every one that I've tried.
Let me know if anyone has any solutions. Thanks.
Posting this to help out others in the future. It actually involved a few things to get this fully working properly:
1)Had to get a X Server
2)Had to change display settings in ubuntu to get it to recognize the X server and turn off some firewall features for Windows.
3)Had to when installing matlab install using the legacy install file instead of the normal install file

Connot find executable after installation

I am trying to install KICS into AWS EC2 (Ubuntu). I am suing the one-line install script:
curl -sfL 'https://raw.githubusercontent.com/Checkmarx/kics/master/install.sh' | bash
However when I run:
kics version
or
which kics
It seems like it cannot find the command. It forces me to reboot before being able to see it, however rebooting is not an option in my use-case.
As per the documentation of KICS (https://docs.kics.io/latest/getting-started/#one-liner_install_script):
Run the following command to download and install kics. It will detect your current OS and download the appropriate binary package, defaults installation to ./bin and the queries will be placed alongside the binary in ./bin/assets/queries:
curl -sfL 'https://raw.githubusercontent.com/Checkmarx/kics/master/install.sh' | bash
If you want to place it somewhere else like /usr/local/bin:
sudo curl -sfL 'https://raw.githubusercontent.com/Checkmarx/kics/master/install.sh' | bash -s -- -b /usr/local/bin
So by default, it will install in /home/<user>/bin folder if using the first command. This folder may not be in PATH environment variable because of which which command doesn't work.
So, you need to install using the second command in order to install in /usr/local/bin which should probably be there in PATH and after that which command will also work.

How to make the dash shell run some commands meant for sh (bash)?

IN BRIEF: I have mysql_config installed on Linux Mint 19. It runs fine when typed into the shell, or run as bash mysql_config. BUT it fails when issued as sh mysql_config or dash mysql_config
BACKGROUND:
On Linux Mint 19, I installed mysql_config with the command sudo apt install libmysqlclient-dev
It seems to start fine when typed into the shell, or run as bash mysql_config.
MY OVER-ARCHING GOAL:
Inside PyCharm, I'm using its native support of pipenv to install a series of Packages listed in a Pipfile document. It all works like a dream for all Packages - EXCEPT that it chokes on mysqlclient (ironically, I have no such problem on a parallel build on Windows 7! But on Linux Mint, it chokes.)
The error file from the failed installation of the mysqlclient Package includes statements like:
"/bin/sh: mysql_config: command not found', ' /bin/sh: mariadb_config: command not found', ' /bin/sh: mysql_config: command not found',"
THE PROBLEM
Presumably, the complaint from the installer stems from a failure to run /bin/sh mysql_config
Indeed, as stated at the beginning, /bin/sh mysql_config FAILS, with the message: /bin/sh: 0: Can't open mysql_config
If I do ls -l /bin/sh, it shows: lrwxrwxrwx 1 root root 4 May 25 00:31 /bin/sh -> dash
And, indeed, I found a reference saying that "in the last couple of years Debian (and Ubuntu) decided to switch the system shell from bash to dash".
So, I'm on Linux Mint, and it looks like my system shell is dash... while the installer is presumably expecting bash (as I mentioned dash mysql_config works.) Any recommendation? Thanks, Linux gurus!

Yum install command not executing from system command in perl

I am trying to install a Linux RPM using system("yum -y install MyRPM.rpm"); in a Perl script.
The problem I am facing is:
The system command gets executed.
It starts installing the RPM
Then, just after the line "running transaction". The script hangs.
Output:
Running Transaction Test
Transaction Test Succeeded
Running Transaction
No output after this line and script hangs.
Usually after this line, if I run yum install from the terminal it displays:
Installing : myRPM [#################################]
But my Perl script hangs at this line.
To solve this, I wrote a bash script to perform the RPM installation and in turn calling it in my perl script. But at the point where the bash script is called and starts executing the yum install command, the script hangs. On the other hand, if I execute the bash script as a standalone script it does the installation smoothly. I have no idea why the perl script gets stuck in between the yum install.
I would really appreciate some help on this.

Why isn't a script executed during provisioning an Ubuntu VM using Vagrant shell script?

I'm trying to install dnvm on an Ubuntu VM using Vagrant. In my vagrantfile I have a shell script that includes this line:
curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH=dev sh && source /root/.dnx/dnvm/dnvm.sh
which downloads and executes dnvminstall.sh which installs and puts dnvm.sh in /root/.dnx/dnvm. The source /root/.dnx/dnvm/dnvm.sh part doesn't seem to have worked because when I ssh into the machine I need to run it manually for dnvm to work.
So the question is, why isn't source /root/.dnx/dnvm/dnvm.sh executed during provisioning?
Here's the vagrantfile in it's entirety.
You're cding into /usr/local/src/libuv-1.4.2 earlier in your script.
Then you're downloading dnvm into that directory using curl, then trying to run the file as if it was in /root/.dnx/dnvm/dnvm.sh, when it's actually somewhere under /usr/local/src/libuv-1.4.2
You just need to cd back into /root before you use curl to get dnvm. So ...
cd /root
curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH=dev sh && source /root/.dnx/dnvm/dnvm.sh
Hope this helps!

Resources