Find the answer to your Linux question:
Results 1 to 3 of 3
Hi everyone, I'm fairly new to linux in general, but I need to use it to run the program I need for another application. After chatting to a friend and ...
  1. #1
    Just Joined!
    Join Date
    Aug 2007
    Posts
    2

    Help with Secure Shell please!

    Hi everyone, I'm fairly new to linux in general, but I need to use it to run the program I need for another application. After chatting to a friend and him giving me some advice, I had got this program working, but since then I can't quite remember exactly what to do.

    I believe the problem is something to do with me not adding the correct directory to my path.

    the path when I log in to the linux shell defaults to this (I'm using a university computer)

    /usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/usr/X11R6/bin:/usr/bin:/bin:/usr/sbin:/sbin:/local/openssh/current/bin: No such file or directory

    my home directory is this

    constraints.opb files.sh myScripts session1 session6 SweeperPackage
    copy.sh flid myWork session2 session8
    data.txt Hello.sh output session3 station.txt
    Desktop make-3.81 recordersEmployed.txt session4 summary.txt
    example.php minisat+_2007-Jan-05 recorder.txt session5 sum.sh


    the program I am wishing to run is minisat+, it is located in this directory

    /home/msc1/msc06/a6912481/minisat+_2007-Jan-05/minisat+

    the full content of the directory is

    ADTs Hardware.h MiniSat.ox PbSolver_convert.ox
    Debug.C Hardware_sorters.C minisat+_script PbSolver_convertSort.C
    Debug.h Hardware_sorters.or PbParser.C PbSolver_convertSort.or
    Debug.or Hardware_sorters.ox PbParser.h PbSolver_convertSort.ox
    Debug.ox INSTALL PbParser.or PbSolver.h
    DebugSolver.h Main.C PbParser.ox PbSolver.or
    depend.mak Main.h PbSolver.C PbSolver.ox
    Examples Main.or PbSolver_convertAdd.C SatELite.C
    gardenout Main.ox PbSolver_convertAdd.or SatELite.h
    Hardware_adders.C Makefile PbSolver_convertAdd.ox SatELite.or
    Hardware_adders.or minisat+_64-bit_static PbSolver_convertBdd.C SatELite.ox
    Hardware_adders.ox minisat+_bignum_static PbSolver_convertBdd.or Solver.h
    Hardware_clausify.C MiniSat.C PbSolver_convertBdd.ox SolverTypes.h
    Hardware_clausify.or MiniSat.h PbSolver_convert.C VarOrder.h
    Hardware_clausify.ox MiniSat.or PbSolver_convert.or


    when running any of the scripts called minisat+_******** I get the following on screen prompt

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    MiniSat+ 1.0, based on MiniSat v1.13 -- (C) Niklas Een, Niklas Sörensson, 2005
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    USAGE: minisat+ <input-file> [<result-file>] [-<option> ...]

    Solver options:
    -M -minisat Use MiniSat v1.13 as backend (default)
    -S -satelite Use SatELite v1.0 as backend

    -ca -adders Convert PB-constrs to clauses through adders.
    -cs -sorters Convert PB-constrs to clauses through sorters.
    -cb -bdds Convert PB-constrs to clauses through bdds.
    -cm -mixed Convert PB-constrs to clauses by a mix of the above. (default)
    -ga/gs/gb/gm Override conversion for goal function (long name: -goal-xxx).
    -w -weak-off Clausify with equivalences instead of implications.

    -bdd-thres= Threshold for prefering BDDs in mixed mode. [def: 3]
    -sort-thres= Threshold for prefering sorters. Tried after BDDs. [def: 20]
    -goal-bias= Bias goal function convertion towards sorters. [def: 3]

    -1 -first Don't minimize, just give first solution found
    -A -all Don't minimize, give all solutions
    -goal=<num> Set initial goal limit to '<= num'.

    -p -pbvars Restrict decision heuristic of SAT to original PB variables.
    -ps{+,-,0} Polarity suggestion in SAT towards/away from goal (or neutral).

    Output options:
    -s -satlive Turn off SAT competition output.
    -a -ansi Turn off ANSI codes in output.
    -v0,-v1,-v2 Set verbosity level (1 default)
    -cnf=<file> Write SAT problem to a file. Trivial UNSAT => no file written.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


    So anyway....... what I am trying to do is run the minisat+ command with an input file located in the Examples folder, so I have added this directory to the path.

    -sh-3.1$ PATH=$PATH:/home/msc1/msc06/a6912481/minisat+_2007-Jan-05/minisat+
    -sh-3.1$ $PATH
    -sh: /usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/usr/X11R6/bin:/usr/bin:/bin:/usr/sbin:/sbin:/local/openssh/current/bin:minisat+_64-bit_static:/home/msc1/msc06/a6912481/minisat+_2007-Jan-05/minisat+: No such file or directory


    After this I try to run the minisat+ command. But whenever I do, I simply get a "command not found" message.

    -sh-3.1$ minisat+ Examples/garden9x9.opb
    -sh: minisat+: command not found


    So could anyone help with this?



    Sorry for the massive length of the post, but I thought it would be best to provide you with as much info as possible

  2. #2
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    The problem is that you added the path of the executable to $PATH. You want to add the _directory_ of the executable to the path.

    For instance, if my program is /home/user/bin/program, I would run:
    Code:
    PATH=$PATH:/home/user/bin
    This is because $PATH is a list of locations to look for executables, not a list of executables.
    DISTRO=Arch
    Registered Linux User #388732

  3. #3
    Just Joined!
    Join Date
    Aug 2007
    Posts
    2
    sh-3.1$ pwd
    /home/msc1/msc06/a6912481/minisat+_2007-Jan-05/minisat+
    -sh-3.1$ PATH=$PATH:/home/msc1/msc06/a6912481/minisat+_2007-Jan-05
    -sh-3.1$ minisat+ /home/msc1/msc06/a6912481/minisat+_2007-Jan-05/minisat+/Examples/garden9x9.opb
    -sh: minisat+: command not found
    -sh-3.1$ minisat+ Examples/garden9x9.opb
    -sh: minisat+: command not found
    -sh-3.1$ $PATH
    -sh: /usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/usr/X11R6/bin:/usr/bin:/bin:/usr/sbin:/sbin:/local/openssh/current/bin:minisat+_64-bit_static:/home/msc1/msc06/a6912481/minisat+_2007-Jan-05/minisat+:/home/msc1/msc06/a6912481/minisat+_2007-Jan-05: No such file or directory
    -sh-3.1$


    just tried the above, and as you can see, no luck. However, it did prompt my memory and I HAVE remembered what I was doing, and it works again, hurrah!

    So thanks very much for your help anyway!

    (I understand what you meant there, but minisat+ is also a directory, as well as the executable)

    In case you're wondering how I sorted it, it turns out that checking the install file showed me that the command shown on the print out when you run the script is actually wrong.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...