schroot is giving error on centos 6 - centos

When I'm using command: schroot -c 32bit -- bash --login -c "rm -rf ~/SC32 ;"
I'm getting these errors:
E: 20copyfiles: cp: cannot create regular file `/var/lib/schroot/mount/32bit-dcc62f68-de18-4d2a-95d9-b71f0be314ce/etc/resolv.conf': No such file or directory
E: 32bit-dcc62f68-de18-4d2a-95d9-b71f0be314ce: Chroot setup failed: stage=setup-start
Since i'm new to Linux Environment i don't know what to do to solve this error.
The Cent OS which I'm using is 6.3 with x64 architecture
Also i have configured 32bit in /etc/schroot/schroot.conf as
[32bit]
type=directory
description=CentOS 6.3 32bit
directory=/chroot/32bit
users=temp
root-groups=root
personality=linux32
Also I Have this directory available /chroot/32bit
I'm not the root user of the system.
Can anybody tell me what to do to resolve this error?

To debug problems with schroot, try running it verbosely:
schroot -v
or to make it really verbose
schroot -v --debug=notice
The actual failure here is to copy /etc/resolv.conf. There are two potential reasons for this
The source file isn't copyable. Normally unlikely, but try cp and cat by hand to check.
The destination doesn't exist. This is the usual cause of such errors.
Your chroot is /chroot/32bit and it's being (bind) mounted on /var/lib/schroot/mount/32bit-dcc62f68-de18-4d2a-95d9-b71f0be314ce. If /chroot/32bit/etc does not exist, then /var/lib/schroot/mount/32bit-dcc62f68-de18-4d2a-95d9-b71f0be314ce/etc won't exist either, and so the copy operation will fail. You must have a proper system available under /chroot/32bit with all the usual directories (/bin, /etc, /lib etc.).
Assuming that you do have a proper chroot in /chroot/32bit, then something has gone wrong during setup. Running with verbose or debug messages enabled may shed some light on the cause of the failure.
Regards,
Roger
(schroot author)

I followed #Roger 's solution and all is well. But I found another workaround solution:
Enter your schroot directory, maybe like this location: /chroot/32bit, you can find this path in "/etc/schroot/schroot.conf" setting file.
cd /chroot/32bit
mv /chroot/32bit/etc/resolv.conf /chroot/32bit/etc/resolv.conf.bk
Then you can try your schroot login command and check is success.
schroot -c 32bit
(32bit)WDan#linux-buildy01:~$
Enjoy it!

Related

Snort Errors: ERROR: /etc/snort/snort.conf(0) Unable to open rules file "/etc/snort/snort.conf": No such file or directory

First time Snort user and running into two issues. After installation on a Windows 10 machine, I am able to initialize snort via an elevated command prompt: snort -A console. While snort it running however I noticed "Warning: No Preprocessors configured for policy 0." mixed into the console output.
A quick Stackoverflow search pointed me to run the following command to solve this, they said: This message indicates that no snort preprocessor is loaded. In order to get rid of this warning, please use the command: snort -v -c /etc/snort/snort.conf
But when I run this command I am greeted with another error:
Running in IDS mode
--== Initializing Snort ==--
Initializing Output Plugins!
Initializing Preprocessors!
Initializing Plug-ins!
Parsing Rules file "/etc/snort/snort.conf"
ERROR: /etc/snort/snort.conf(0) Unable to open rules file "/etc/snort/snort.conf": No such file or directory.
Fatal Error, Quitting..
This is where I get lost since that's where I have the config file (initally it was just /etc/snort.conf, but created a snort folder so the directory / file exists).
If anyone has any insight into this I would be more than grateful!
Make sure the file snort.conf has necessary permission and ownership. The directory /etc/snort should contain "chmod -R 5775" level permission. If you are installing it from source, you would be always able to copy the snort.conf to /etc/snort.

make check fails to start in Postgres 8.4.2

I am running into a strange error when trying to run PostgreSQL 8.4.2's regression suite on a new Ubuntu instance that I've created on Amazon EC2.
I can configure PostgreSQL successfully:
$ ./configure
[ Output not shown ]
$ tail -1 config.log
configure: exit 0
It builds just fine:
$ make
[ Ouput clipped ]
All of PostgreSQL successfully made. Ready to install.
But when I try to run the regression suite, I receive an error:
$ make check
[ Ouput clipped ]
make[2]: Entering directory `/home/ubuntu/stock/postgresql-8.4.2/src/test/regress'
You must use GNU make to use Postgres. It may be installed
on your system with the name 'gmake'.
However, I believe that I am running GNU Make:
$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for x86_64-pc-linux-gnu
$ ls -l `which gmake`
lrwxrwxrwx 1 root root 13 Feb 6 17:41 /usr/bin/gmake -> /usr/bin/make
I see that in the src/test/regress directory, there is a Makefile:
$ cat src/test/regress/Makefile
# The Postgres make files exploit features of GNU make that other makes
# do not have. Because it is a common mistake for users to try to build
# Postgres with a different make, we have this make file that does nothing
# but tell the user to use GNU make.
# If the user were using GNU make now, this file would not get used because
# GNU make uses a make file named "GNUmakefile" in preference to "Makefile"
# if it exists. Postgres is shipped with a "GNUmakefile".
all install clean check installcheck:
#echo "You must use GNU make to use Postgres. It may be installed"
#echo "on your system with the name 'gmake'."
The comments in that Makefile indicate that there should be a file named GNUmakefile in that directory, but there is not:
$ ls src/test/regress/*akefile
src/test/regress/Makefile
There is a GNUMakefile in the top-level directory:
$ ls *akefile
GNUmakefile Makefile
Even when I force make and make check to use the GNUmakefile, via -f GNUmakefile, the same error occurs.
Note that I can run the regression suite just fine on my home machine.
Does any one have any ideas why it's not working on the EC2 instance?
EDIT: On my home machine, I'm running Ubuntu 12.04. The EC2 instance is running 13.10. Both machines are running make version 3.81.
You must have a messed up download or checkout. There should be a src/test/regress/GNUmakefile there, as you suspected. Try downloading again.
This is what that directory looks like on mine:
$ ls src/test/regress/*akefile
src/test/regress/GNUmakefile src/test/regress/Makefile

Sublime Text CoffeeScript build system: `env: node: No such file or directory`

I'm trying to set up a CoffeeScript build system in Sublime Text 3, but I keep getting the following error:
env: node: No such file or directory
[Finished in 0.0s with exit code 127]
[cmd: ['coffee', '-o','/Users/jcourtdemone/Sites/autotempest.com/new_design_sandbox/static/script', '-cw', '/Users/jcourtdemone/Sites/autotempest.com/new_design_sandbox/static/coffee']]
[dir: /Users/jcourtdemone/Sites/autotempest.com/new_design_sandbox/static/coffee]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
My build system looks like this:
{
"name": "Coffee - AT",
"cmd": ["coffee","-o","${project_path:${folder}}/static/script","-cw","${project_path:${folder}}/static/coffee"],
"selector": "source.coffee",
"path":"/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/lib/node_modules/coffee-script/bin"
}
Two things strange about this.
1) It says it's looking in /usr/bin where a symlink to coffee exists.
2) Because of (1), I overrode $PATH to include the actual location of coffee which is /usr/local/lib/node_modules/coffee-script/bin, but for some reason, $PATH isn't being overridden properly, it's sticking with the default $PATH.
Things to note:
i) I've verified that all paths are correct and pass normally through a regular terminal command.
ii) Tried with a "shell": true variable in the build system.
iii) I have another build system for Compass like this that works fine.
Anyone run into similar problems or issues? Any ideas?
In Terminal, type which node, then create a symlink to that location in /usr/bin. For example, if node lives in /usr/local/bin, create the symlink like so:
sudo ln -s /usr/local/bin/node /usr/bin/node
If you look at the source of your coffee script, you'll probably find that the first line is something along the lines of:
#!/usr/bin/env node
Exit code 127 in Sublime means that an env command has failed - so in your case, the build system is finding coffee, but it can't execute it because the node binary isn't in Sublime's default search path.
There are two ways to redefine the default search path for Sublime. The first (and easiest) is to always open it from the command line using the built-in subl command. If you're an OS X power user and don't mind messing with important system settings, check out my post on unix.SE on how to alter the default /usr/bin:/bin:/usr/sbin:/sbin path that you're seeing. Be forewarned that if you don't do things correctly, you may break your system. However, if you're running Mountain Lion (10.8.X) and you follow the instructions exactly, everything should be fine. (I haven't upgraded to Mavericks, so no guarantees on whether it'll work with that version.)
How to solve the problem under an Ubuntu System
The fact is "coffee" command will call /usr/bin/node to continue its work, however, the original "node" command for the node application on an Ubuntu system is changed from "node" to "nodejs" to avoid name conflicting. That is the reason, the shell will compliant you "/usr/bin/env: node: No such file or directory". whenever you type
$ coffee
To solve the bug, just let the shell find something named "node" in its default searching path, and this so-called "node" will promote nodejs. The command "nodejs" lies under path of /usr/bin/nodejs.
We will use symbol link to link "node" with nodejs, and place the link "node" within the default searching path, so that the shell will find it.
sudo ln -s /usr/bin/nodejs /usr/bin/node
But beware, make sure that you do NOT have another "node" command under /usr/bin/, you can check it by try to run
$ which node
I do NOT know what to do if you have installed another "node" application.
In Ubuntu you can install the package nodejs-legacy
sudo apt-get install nodejs-legacy
this package just create a symbolic link to binary nodejs
You should be able to fix this all in your build system without needing to add a symlink on your machine.
For example if node lives in /usr/local/bin/node all you have to do is change the path in your build_system to be:
"path": "/usr/local/bin:$PATH"
I had the same problem with Sublime Text 2.
Creating this sublime build worked for me:
{
"cmd": ["coffee", "-c", "$file"],
"selector" : "source.coffee",
"path" : "/usr/local/lib/node_modules/coffee-script/bin/:/usr/local/bin:$PATH"
}
The following code worked for me in Ubuntu 14.04:
**$ sudo apt-get install NodeJS-legacy**
The other problem was the version checking frameworks such as for e.g: gulp -v the same code also solved this problem.
Type the next in the console:
sudo ln -s /usr/bin/nodejs /usr/bin/node

install CPAN module

I have a problem when i want to install perl module
I make " cpan" to install cpan , but i get this "
Terminal does not support AddHistory.
Your configuration suggests that CPAN.pm should use a working
directory of
/home/cyrine/.cpan
Unfortunately we could not create the lock file
/home/cyrine/.cpan/.lock
due to permission problems.
Please make sure that the configuration variable
$CPAN::Config->{cpan_home}
points to a directory where you can write a .lock file. You can set
this variable in either a CPAN/MyConfig.pm or a CPAN/Config.pm in your
#INC path;
You don't seem to have a user configuration (MyConfig.pm) yet.
i make "y"
then i got this strange message :
mkdir /home/cyrine/.cpan/CPAN: Permission denied at /usr/share/perl/5.10/CPAN/Shell.pm >line 656
Any idea please?
Thank you
The immediate cause of this problem is that you don't have write permissions on /home/cyrine/.cpan. In my experience, this is most often the result of logging in as a normal user, then running cpan for the first time on that account in a su session, causing the CPAN configuration to be created in ~cyrine (because you have cyrine's environment), but owned by root (because su has given you root's permissions). Assuming that is the case, you should be able to resolve this my suing to root, running the command chown -R cyrine.cyrine /home/cyrine/.cpan and then running cpan as user cyrine.

pycuda -- 'CUDA_ROOT not set, and nvcc not in path.'

Although i had installed pycuda and using it ok,it started (without doing sth) not to work.So,i i tried to do the install again ,but when i am doing
python configure.py --cuda-root=/usr/local/cuda/bin
it gives me the error in the title.
The nvcc file is in the above directory.
pycuda is not finding nvcc. Did you try adding /usr/local/cuda/bin to your env PATH variable? That's the way I have this setup.
Edit:
As far as I can tell the configure.py doesn't call nvcc compiler it just creates the the makefile. I take that this problem happens when you run sudo -c "make install" which calls setup.py.
A couple of things to try. Make sure that you have CUDA_ROOT set:
echo $CUDA_ROOT
If it's empty, set it with:
export CUDA_ROOT=/usr/local/cuda/bin
Try running the make command again. Now with the -E to preserve your env:
sudo -E sh -c "make install"
I encountered the same issue on a Slackware64 13.37.
Install command su -c "make install" switches to root (0bv10u5Ly) thus CUDA_ROOT should be set in the root's profile. CUDA_ROOT is not an environment variable, it's used by the setup.py. Add /usr/local/cuda/bin to PATH and define CUDA_ROOT=/usr/local/cuda/bin then try to install again.
This is the quick and dirty way but if none of above worked out for you like me, below will definitely work. (:
Remove
nvcc_path = search_on_path(["nvcc", "nvcc.exe"])
if nvcc_path is None:
print("*** CUDA_ROOT not set, and nvcc not in path. Giving up.")
sys.exit(1)
and set
cuda_root_default = "/usr/local/cuda/bin"
in setup.py file. Then try su -c "make install".
In my case, I had to set CUDA_ROOT=/usr/local/cuda because with /usr/local/cuda/bin path, it was not able find include folder and it was failing with error didn't find cuda.h.