How to run my smv file on NuSMV - model-checking

I have installed NuSMV 2.5.4 on a ubuntu machine. When I run it in interactive mode using the command NuSMV -int first.smv I get the following response cannot open input file first.smv. Why is that? I have placed my smv file(first.smv) in the bin folder.

Your first.smv should be in the folder that you run the command, not in the bin folder

You will need to specify the filepath to "first.smv" such as:
$ NuSMV> read_model -i C:/your folder/first.smv
that will read the model. But Model won't be visible until you give other relevant commands.
HTH

Related

sudo ./sakis3g not found Python subprocess

I need subprocess in my script to connect with 3G. But unfurtunately it's throwing me alot of errors. So I was hoping maybe someone here could help me.
My code:
import subprocess
import time
subprocess.run('sudo ./sakis3g connect OTHER="USBMODEM" USBMODEM="12d1:1001" APN="internet"', shell=True)
When I run this simple script in my home directory I get the following error:
sudo: ./sakis3g: command not found
Is it maybe because the sakis3g script itself it located in /usr/local/bin. Any help would be appreciated, thanks in advance
I run this simple script in my home directory
./ means the current directory i.e. the home directory in this case.
Is it maybe because the sakis3g script itself it located in /usr/local/bin
/usr/local/bin is (likely) not your home directory. sudo can't find sakis3g in the current directory because there is no such file.
Use /usr/local/bin/sakis3g instead of ./sakis3g.
copy that saskis3g object file in your directory where you have your code then you can use the command directly without including any file path for the object file(i.e sakis3g) in your connect command.
if suppose you have a folder named sample. and your program resides in this folder then copy+paste the sakis3g object file to this folder[you can do this by using the CP command in linux ] and use the normal command ie " system("sudo ./sakis3g connect"); " no need of any path.

Ubuntu: hadoop command not found

I am trying to check my installation of hadoop. I did create the environment variables and when I call printenv, I do see my HADOOP_HOME and PATH variables printed and correct (home/hadoop and HADOOP_HOME/bin respectively).
If I go to home/hadoop in the terminal and call ls, I see the hadoop file there. If I try to run it by calling hadoop, it still tells me command not found.
First day on Linux, so there may be a stupid answer to this problem.
Your current working directory is probably not part of your path.
That is default on linux systems.
If you are in the same directory, where your hadoop file is, run that command with an relative path, like: ./hadoop
HOME DIRECTORY:
/home/hadoop is a home directory created by linux similar to Document and settings in windows.
Open your terminal and type:
ls -l /home/hadoop
Post your result for this command: ls -l /home/hadoop
SETTING GLOBAL PATH:
Go to /home/hadoop and open .bashrc in text editor.
Add these lines at the end:
export HADOOP_HOME=/path/to/your/hadoop/installation/folder
export PATH=$PATH:$HADOOP_HOME/bin
Save and exit. Now type, this in your teminal:
echo $PATH
echo $HADOOP_HOME
If these commands shows correct directories, try hadoop command. It should work.
Post your result for these command: echo $PATH and echo $HADOOP_HOME
Go to Hadoop-x.x.x/bin folder
check for hadoop folder there
run ./hadoop version
You must run “hadoop version” command.
If the hadoop setup is fine, then you should see the following result:
Hadoop 2.4.1
Subversion https://svn.apache.org/repos/asf/hadoop/common -r 1529768
Compiled by hortonmu on 2013-10-07T06:28Z
Compiled with protoc 2.5.0
From source with checksum 79e53ce7994d1628b240f09af91e1af4
For installation related guide you can refer here:
Hadoop Environment Setup
Link to my quora answer https://qr.ae/TWngHN
Hope this helps.
Thanks
Enter which hadoop in your terminal. If you see a path as an output, hadoop is set in PATH of your system. If you get something similar to this,
usr/bin/which: no hadoop in (/usr/local/hadoop.... you might not have setup everything properly. Modify the /etc/bash.bashrc with
export HADOOP_HOME = /path/to/hadoop/folder and add it to PATH using export PATH=$PATH:HADOOP_HOME/bin
You may be editing the wrong ~/.bashrc file.
Open terminal and run sudo gedit ~/.bashrc and edit these command
export HADOOP_HOME=/usr/local/hadoop
export PATH=$PATH:$HADOOP_HOME/bin
export PATH=$PATH:$HADOOP_HOME/sbin
Note: You must not use sudo gedit ~/.bashrc.sh these both work differently on newer OS

Running ffmpeg in Terminal Linux

I've downloaded and unzipped ffmpeg at custom directory in my Ubuntu linux. Now I want to run this ffmpeg using terminal like I run on windows using command prompt. But everytime it says "ffmpeg: command not found". My question is how can I run ffmpeg using terminal through extracted libraries
thanks
First you need to make sure the file has execute permissions... or just add it with chmod +x filename
Secondly either the executables must be on the path or you need to specify the path to the executable. What I mean by this is, under Windows if you are in a directory with an executable you can type in the executable name and it will work... this is not the case for Linux. If you are in the executable's directory you execute the command like this ./command. The dot means you are executing a file in the current directory

running Matlab in bash script; matlab: not found

The code to run matlab in bash script:
matlab -nodesktop -nosplash -nodisplay -r "run ./myDir/myfile ; quit;"
I have Matlab installed on my computer, however when I run the bash script I get this error:
matlab:not found
I don't know if it is because of the Matlab's path (/home/myComputerName/Documents/MATLAB/bin/matlab) in my computer, which is located under /Documents/.
What causes this problem? If it is because of the path, is there a general solution, i.e. running matlab is independent where it is installed, for this?
The general solution is to add the directory containing the binary to your PATH, or, conversely, to properly install the program so that it appears in a directory which is already included in your PATH. For locally installed software, the standard location is /usr/local/bin.
Typically you would edit your .bashrc and log out and back in to update your PATH.
Try matlab support, it just solved a lot of my path/launcher related issues
sudo apt-get install matlab-support

Cygwin and PHPUnit: Could not open input file: /cygdrive/c/xampp/php/phpunit

Is there a way to run PHPUnit from Cygwin? Everytime I run PHPUnit I get this error:
Could not open input file: /cygdrive/c/xampp/php/phpunit
I am trying to run my unit tests in my Zend Framework App. I am trying to use Cygwin because I am more familiar with *Nix commands (I'm no expert though) rather than Windows.
Thanks,
Wenbert
same problem here, solved it by an alias added to ~/.bash_profile
alias phpunit="/cygdrive/c/xampp/php/php C:/xampp/php/phpunit"
I am having the same problem, I can't get "phpunit" to work by itself, I am using Wamp.
However, I was able to run "phpunit.bat" and it worked for me.
Still can't get the ANSI colors to show up though :(
Does /cygdrive/c/xampp/php/phpunit exist? If so what are the permissions on the file?
Try
ls -l /cygdrive/c/xampp/php/phpunit
Let's use phpunit as dependency and in folder above vendor try:
ln -s vendor/phpunit/phpunit/composer/bin/phpunit phpunit
It will create for you a symbolic link to real path of phpunit
You could just directly call it by using Windows path in Cygwin:
C:/xampp/php/phpunit --version
So you could set an alias for ~/.bash_profile:
alias phpunit="C:/xampp/php/phpunit"

Resources