No such file or directory in ubuntu - nosuchfileexception

Receiving following error stack:
dhruv#dhruv-Inspiron-N5010:~/Downloads/hadoop-2.7.1/bin$ cd
dhruv#dhruv-Inspiron-N5010:~$ cd Downloads/hadoop-2.7.1/sbin
dhruv#dhruv-Inspiron-N5010:~/Downloads/hadoop-2.7.1/sbin$
sbin/start-dfs.sh
-bash: sbin/start-dfs.sh: No such file or directory
dhruv#dhruv-Inspiron-N5010:~/Downloads/hadoop-2.7.1/sbin$
sbin/start-all.sh
-bash: sbin/start-all.sh: No such file or directory
dhruv#dhruv-Inspiron-N5010:~/Downloads/hadoop-2.7.1/sbin$ ssh
localhost
Welcome to Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-65-generic x86_64)
Documentation: https://help.ubuntu.com/
Last login: Thu Oct 8 10:50:16 2015 from localhost
dhruv#dhruv-Inspiron-N5010:~$ cd Downloads/hadoop-2.7.1/sbin
dhruv#dhruv-Inspiron-N5010:~/Downloads/hadoop-2.7.1/sbin$
sbin/start-dfs.sh
-bash: sbin/start-dfs.sh: No such file or directory

You already changed to the sbin directory, so now you have to use
./start-dfs.sh
instead of
sbin/start-dfs.sh

start-all.sh is a file not a directory,
to run such files you must use ' ./ ' before the executable file,
try :
./start-all.sh

Related

docker-compose permission denied error in hidden folder

docker-compose runs for the yml file in /home/mac as follows:
docker-compose -f /home/mac/vscode.yml build
however gives a permission denied error within /home/mac/.config/ folder:
docker-compose -f /home/mac/.config/vscode.yml build
Error is:
ERROR: .PermissionError: [Errno 13] Permission denied: '/home/mac/.config/vscode.yml'
There seems to be a similar problem to what Jamshaid stated below:
https://stackoverflow.com/a/64585125/393171
So I have given 777 permission to both mac and .config folders; but still doesn't work.
drwxrwxrwx 20 mac mac 4096 Oca 26 22:25 mac
drwxrwxrwx 23 mac mac 4096 Oca 26 22:26 .config
Another strange thing is that this works fine with docker compose command
docker compose -f /home/mac/.config/vscode.yml build
Docker version 20.10.23, build 7155243
docker-compose version 1.29.2, build unknown
But I need to make docker-compose run because Visual Studio Code uses docker-compose in Dev Containers extention.
So may anyone help me figure out what kind of a problem is this? :)
I use Ubuntu 22.04.1 LTS.

I think I screwed up my file directory while trouble-shooting in jupyter notebook/python3

I'm not sure exactly where to start with this question, but I am relatively new to python and have mostly been working with Jupyter notebook & Python 3.7.
After working/trouble-shooting my way through a number of problems (particularly setting up a virtual environment and installing packages to that environment) I seem to have screwed up my file directory.
What's particularly troubling is I can't launch jupyter notebook from my base(root), instead I get the following text displayed in terminal:
Last login: Sun Dec 22 21:02:15 on ttys000
/Users/*********/anaconda3/bin/jupyter_mac.command ; exit;
-bash: dirname: command not found
-bash: dirname: command not found
-bash: /etc/profile.d/conda.sh: No such file or directory
-bash: conda: command not found
********-MacBook-Pro:~ *********$ /Users/********/anaconda3/bin/jupyter_mac.command ; exit;
/Users/********/anaconda3/bin/jupyter_mac.command: line 1: dirname: command not found
/Users/********/anaconda3/bin/jupyter_mac.command: line 3: /jupyter-notebook: No such file or directory
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
Above, my name has redacted.
On the other hand, if I open a blank terminal window, I am prompted with:
Last login: Sun Dec 22 20:54:30 on ttys000
-bash: dirname: command not found
-bash: dirname: command not found
-bash: /etc/profile.d/conda.sh: No such file or directory
-bash: conda: command not found
********-MacBook-Pro:~ ********$
Any help would greatly be appreciated! I am going to try to do a system update tonight to see if that resolves anything in the meantime.
You may have changed your .bash_profile and removed /usr/bin from PATH (which is where dirname and other commands are located) and perhaps other things too.
Check the content of $PATH:
$ echo $PATH
and restore whatever seems missing.
I'm not sure, but I think the conda environment is wrong on your Mac.
Can you try the next one?
open terminal
type
source ~/anaconda3/etc/profile.d/conda.sh
type
conda init
restart terminal
try jupyter notebook again

Installing a .run file in Linux

I am using Linux Mint 19. I am working on the TI 15.4 Stack - Linux Gateway Project Zero. I am on task 3, Install the TI-15.4 Stack Linux Gateway SDK.
I installed this file by following the link:
ti154stack_linux_x64_2_08_00_04.run
and through the Linux terminal I navigated to the folder where the above file is installed, and I put the following commands in the terminal as stated per the instructions:
chmod +x ti15.4stack_linux_x64_2_08_00_04.run ./ti15.4stack_linux_x64_2_08_00_04.run
and this is what I got :
$ chmod +x ti15.4stack_linux_x64_2_08_00_04.run ./ti15.4stack_linux_x64_2_08_00_04.run
chmod: cannot access 'ti15.4stack_linux_x64_2_08_00_04.run': No such file or directory
chmod: cannot access './ti15.4stack_linux_x64_2_08_00_04.run': No such file or directory
I copied the file name it is ti154stack_linux_x64_2_08_00_04.run .
I would appreciate it if you can write them in 2 seperate commands if that is how you think they need to be entered. Here is what I get after performing ls

Compile .tex file with latexmk with www-data user (opencpu)

i run opencpu 1.5 [1] on ubuntu 14.04 server. My R-Package create an .tex file an trigger a system call to compile the pdf file with latexmk.
system("latexmk -xelatex -interaction=batchmode mylatex.tex")
On ubuntu 12.04 LTS it works fine.
This not working after updating from ubtuntu 12.04 LTS to 14.04 LTS.
The process is running as www-data user. With other system-users i can compile the .tex files with latexmk.
My LaTeX Version: TexLive 2016 full
Here the out from:
print(Sys.getenv())
...
APACHE_RUN_GROUP www-data
APACHE_RUN_USER www-data
HOME /tmp/ocpu-temp
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/texlive/current
...
Any ideas?
Thx!
--
[1] https://www.opencpu.org/
I found this entry in my log file:
apparmor="DENIED" operation="exec" profile="opencpu-exec"
name="/usr/local/texlive/2016/texmf-dist/scripts/latexmk/latexmk.pl" pid=4305 comm="sh" requested_mask="x" denied_mask="x" fsuid=33 ouid=0
Then I added the following line:
/usr/local/texlive/2016/texmf-dist/scripts/latexmk/latexmk.pl ux,
in this /etc/apparmor.d/opencpu.d/custom file.
This has solved my latexmk issue.
Thx to Jeroen

Google Sitemap Generator error 'is not a supported Apache binary or control script' during installation

I have a LAMP configurated server AMD64 with Ubuntu 14.04 and Apache2 on an EC2 instance.
I followed the official guide here, so first
I downloaded the sitemap_linux-x86_64-beta1-20091231.tar.gz and unpacked it
Then I typed sudo sitemap-install/install.sh –-apache-bin=/usr/sbin/apache2 and here comes my problem:
What is the location of the Apache binary or control script?
[/usr/sbin/apache2] should support -V option.
/usr/sbin/apache2 is not a supported Apache binary or control script.
I'm sure about the location, infact if I restart Apache from the log file I can see AH00094: Command line: '/usr/sbin/apache2'. I have also tried using this as location /usr/sbin/apache2ctl but no way.
I tried searching on Google for days without find anything.
Why I cannot install the Google Sitemap Generator using /usr/sbin/apache2 as location of my Apache?
UPDATE
if I type apache2 -V the output is a list of warning Invalid Mutex directory in argument file:${APACHE_LOCK_DIR} but it's because the request output from the /usr/sbin/apache2 binary directly and so the /etc/apache2/envvars file isn’t sourced as explained here
Doesn't the documentation say to use -a and not --apache-bin, so you should be doing:
sudo sitemap-install/install.sh –a /usr/sbin/apache2
Both my apache2 binary and my apache2ctl control script understand the -V argument:
root#:~# apache2 -V
Server version: Apache/2.2.22 (Ubuntu)
Server built: Jul 24 2015 17:25:42
root#:~# apache2ctl -V
Server version: Apache/2.2.22 (Ubuntu)
Server built: Jul 24 2015 17:25:42
Looks to me like you should be doing this:
sudo sitemap-install/install.sh –-apache-bin=/usr/sbin/apachectl
Also the /usr/sbin/apachectl is likely a soft link so just run an ls -la on that if you want to know the real location.

Resources