open("../data/../data/ in terminal ubuntu - linux

I have a code which compiles. When I run the executable file in terminal the following error appears:
terminate called after throwing an instance of 'chrono::ChException'
what(): Cannot open stream
Aborted (core dumped)
I then run:
strace -e trace=open ./myexe
And I see that the program fails at:
open("../data/../data/_template_POV.pov", O_RDONLY) = -1 ENOENT (No such file or directory)
I have a file called "_template_POV.pov" but I don't know where to paste the file since do not know what "../data/../data/" means.
Can anyone help me?
Regards,
Anders

open("../data/../data/_template_POV.pov", O_RDONLY)
means that you should have your file in a directory ../data/ with a relative path of your executable. Could you check this ?

Related

ERROR: In /vtk/IO/Import/vtkOBJImporter.cxx

I've tried to run tutorial example of kuka robot from website https://drake.guzhaoyuan.com/ but it failed while reading .obj files.
command: ./bazel-bin/manipulation/util/geometry_inspector ./manipulation/models/iiwa_description/sdf/iiwa14_no_collision.sdf
error: ERROR: In /vtk/IO/Import/vtkOBJImporter.cxx, line 495 vtkOBJPolyDataProcessor (0x5620bd39e440): Error reading 'v' at line 3
Things I've tried so far:
Open .obj files with Mashlab and save with character "v" (3 floats / 6 floats)
Open .obj files with Mashlab and save with character "vn" (3 floats)
Software:
Ubuntu 18.04.4 LTS
VTK version 7.1.1
The "VTK version 7.1.1" is a red flag for me. Drake explicitly uses version 8.2. So, the error may simply come down to the fact that you're connecting to an archaic vtk.
Try:
strace -o trace_output.txt python ./bazel-bin/manipulation/util/geometry_inspector ./manipulation/models/iiwa_description/sdf/iiwa14_no_collision.sdf
And then search te file trace_output.txt for libvtkIOGeometry. My results include:
stat("/home/seancurtis/code/drake/bazel-bin/manipulation/util/geometry_inspector.runfiles/drake/bindings/pydrake/../../_solib_k8/_U#vtk_S_S_CvtkIOGeometry___Ulib/haswell", 0x7ffd1a5cb790) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/seancurtis/code/drake/bazel-bin/manipulation/util/geometry_inspector.runfiles/drake/bindings/pydrake/../../_solib_k8/_U#vtk_S_S_CvtkIOGeometry___Ulib/x86_64/libvtkIOGeometry-8.2.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/seancurtis/code/drake/bazel-bin/manipulation/util/geometry_inspector.runfiles/drake/bindings/pydrake/../../_solib_k8/_U#vtk_S_S_CvtkIOGeometry___Ulib/x86_64", 0x7ffd1a5cb790) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/seancurtis/code/drake/bazel-bin/manipulation/util/geometry_inspector.runfiles/drake/bindings/pydrake/../../_solib_k8/_U#vtk_S_S_CvtkIOGeometry___Ulib/libvtkIOGeometry-8.2.so.1", O_RDONLY|O_CLOEXEC) = 3
I've only included two lines: THere are multiple instances that finish with = -1 ENOENT (No such file or directory) and one that ends in = 3. In all cases, the library its looking for is: libvtkIOGeometry-8.2.so.1.
What does your show? I suspect the wrong one. If it does, we'll have to drag one of the build experts in to figure out why you're getting the wrong vtk. But we can prime that with the answers to the following question:
How do you have drake on your machine? Install? Build from source?

Can Execute Commands in Terminal But Not from Text File

I'm running code using Ubuntu on a WSL. Every time I edit some C files I need to execute a makefile and run an installer to ensure that the changes are reflected in the python package that I am using. The set of commands I need to execute is
make clean
make
cd python
python setup.py install --user
This works perfectly when I execute them in the terminal. In order to make my life easier, I decided to put these commands in a text file Compile.txt to be executed whenever I need to compile the relevant files. I found this question and tried to replicate its solution. However, whenever I type ./Compile.txt into the terminal I get the error
'. Stop. No rule to make target 'clean
gcc -o .o
gcc: fatal error: no input files
compilation terminated.
make: *** [<builtin>: .o] Error 1
./Compile.txt: line 7: cd: $'python\r': No such file or directory
python: can't open file 'setup.py': [Errno 2] No such file or directory
Can anyone explain what I've done wrong? I apologise for any misuse of terminology as I'm still quite new to Linux.
Thanks in advance.

EC2 + Apache + Miniconda + mod_wsgi import errors

I'm trying to get apache and mod_wsgi to work on an amazon ec2 instance, using a miniconda3 virtual environment and I am unable to get the WSGIDaemonProcess to correctly load the python venv modules (getting the 'encodings' module not found errors). I have run mod_wsgi-express module-config to get the proper path settings.
The relevant lines from my http.conf:
LoadModule wsgi_module "/home/ec2-user/miniconda3/envs/ebenv/lib/python3.6/site-packages/mod_wsgi/server/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so"
WSGIPythonHome "/home/ec2-user/miniconda3/envs/ebenv"
WSGIDaemonProcess django python-home=/home/ec2-user/miniconda3/envs/ebenv python-path=/home/ec2-user/enerbits
WSGIProcessGroup django
WSGIScriptAlias / /home/ec2-user/repo/website/wsgi.py
When I perform a sudo strace httpd -X I can see that it is trying to load files from a /lib64 dir that doesn't exist in the venv. Here is the output:
stat("/home/ec2-user/miniconda3/envs/ebenv/lib64/python3.6", 0x7ffe873e1860) = -1 ENOENT (No such file or directory)
stat("/home/ec2-user/miniconda3/envs/ebenv/lib64", 0x7ffe873e1860) = -1 ENOENT (No such file or directory)
stat("/home/ec2-user/miniconda3/envs/ebenv", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
stat("/home/ec2-user/miniconda3/envs/ebenv/lib64/python3.6", 0x7ffe873e0ec0) = -1 ENOENT (No such file or directory)
stat("/home/ec2-user/miniconda3/envs/ebenv/lib64/python3.6/lib-dynload", 0x7ffe873e1860) = -1 ENOENT (No such file or directory)
stat("/home/ec2-user/miniconda3/envs/ebenv/lib64/python3.6", 0x7ffe873e1860) = -1 ENOENT (No such file or directory)
stat("/home/ec2-user/miniconda3/envs/ebenv/lib64", 0x7ffe873e1860) = -1 ENOENT (No such file or directory)
stat("/home/ec2-user/miniconda3/envs/ebenv", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
stat("/home/ec2-user/miniconda3/envs/ebenv/lib64/python3.6/lib-dynload", 0x7ffe873e0ec0) = -1 ENOENT (No such file or directory)
I have tried reinstalling miniconda, mod_wsgi (both using pip and building from source) to no avail. I've searched around and found a few posts that detailed a solution to point the python-path to the site-packages dir or even moving libs into a different dir which seem like a dodgy option. The miniconda3 install is 64-bit.
To note, previously I had been using virtualenv to make a python env and it was working fine (I suppose because the /lib64 dir is used) but I need to use conda for a pytorch installation. Any help is greatly appreciated. I am not particularly well versed in sysadmin stuff of this type so I am somewhat muddling my way through it all.

cygwin occures an error :"Segmentation fault (core dumped)", when running GIZA++

I've ran GIZA++ on cygwin but it had an error "Segmentation fault (core dumped)". i cann't find any config file. Please help me, how can I fix it.
I had the same issue and could fix it by defining the environment variable USER. Either set in in your system properties, or in a cygwin bash shell execute:
export USER=Anything
GIZA++ appends the username to the output files.

sh: 0: getcwd() failed: No such file or directory on cited drive

I am trying to compile ARM code on Ubuntu 12.04 (Precise Pangolin).
Everything is working fine when I put the code in the local directory.
But when I put the code in the cited mount directory, an error shows up:
making testXmlFiles
sh: 0: getcwd() failed: No such file or directory
ARM Compiling xxxxx.c
sh: 0: getcwd() failed: No such file or directory
Here is my setting in fstab:
//10.0.0.1/data /mnt/data cifs auto,noserverino,credentials=/root/.smbcredentials,file_mode=0777,dir_mode=0777,uid=user,gid=users,noperm 0 0
What is going on here? What could cause this error?
This error is usually caused by running a command from a directory that no longer exists.
Try changing your directory and rerun the command.
That also happened to me on a recreated directory. The directory is the same, but to make it work again, just run:
cd .
Try the following command. It worked for me.
cd; cd -
This can happen with symbolic links sometimes. If you experience this issue and you know you are in an existing directory, but your symbolic link may have changed, you can use this command:
cd $(pwd)
In Ubuntu 16.04.3 LTS (Xenial Xerus), the following command works for me:
exit
Then I've login again.
Please check whether the directory path exists or not. This error comes up if the folder doesn't exist from where you are running the command.
Probably you have executed a remove command from the same path on the command line.
If some directory/folder does not exist, but somehow you navigated to that directory, in that case you can see this error.
For example:
currently, you are in the "mno" directory (path = abc/def/ghi/jkl/mno
run "sudo su" and delete mno
go to the "ghi" directory and delete the "jkl" directory
now you are in the "ghi" directory (path abc/def/ghi)
run "exit"
after running the "exit", you will get that error
now you will be in "mno"(path = abc/def/ghi/jkl/mno) folder. That does not exist.
So, generally this error will show when the directory doesn't exist.
To fix this, simply run "cd;" or you can move to any other directory which exists.
In my case, none of the previous answers has worked.
After banging my head against the wall for a while I've found out, that I've destroyed the /etc/passwd entries by running a custom-made-linux-server-setup-bash-script which worked well previously, but this time the regex within the "sed" command erased all the existing entries :D
After copy pasting the default entries from another working Linux server, I could finally restart sshd.
So don't forget to back up the original /etc/passwd file before applying any regular expression replacements on it :)

Resources