I'm trying to install ElasticSearch with godaddy hosting, but it's keep getting me this error:
-bash: sudo: command not found
echo $PATH
/usr/local/jdk/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/cpanel/composer/bin:/opt/puppetlabs/bin:/opt/dell/srvadmin/bin:/usr/local/bin:/usr/X11R6/bin:/home/bingoladmin/.local/bin:/home/bingoladmin/bin
Linux distribution Red hat
Related
I am using RHEL 9.1 machine where I am trying to install a package 'python3-distro' but I am getting error:
Error: Failed to download metadata for repo 'advanced-virtualization': Cannot prepare internal mirrorlist: No URLs in mirrorlist
can anyone please help me resolve this issue?
I was expecting 'sudo dnf install python3-distro' to work successfully.
I tried running below cmds:
sudo sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/*
sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/*
and as result after reboot I am getting below error:
Error: Failed to download metadata for repo 'advanced-virtualization': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Output- ls 'yum.repos.d'
$ls /etc/yum.repos.d/
advanced-virtualization.repo nfv-openvswitch.repo redhat.repo
ceph-pacific.repo rdo-release.repo
messaging.repo rdo-testing.repo
Any help would be appreciated.
I just installed MongoDB through homebrew and ran it as a macOS service, then I started the server with command:
brew services start mongodb-community#4.4
==> Successfully started mongodb-community#4.4 (label: homebrew.mxcl.mongodb-community#4.4)
so it's running
but when I tried to run the mongo shell with command: mongo
it just showed zsh: command not found: mongo
add the mongo location path to the zsh PATH variable:
echo export PATH=/opt/homebrew/opt/mongodb-community#4.4/bin:$PATH >> ~/.zshrc
open new terminal and try starting again
I want to install MarkLogic 9 on my ubuntu machine. I tried following steps from this doc
sudo apt-get install alien
sudo alien --to-deb --verbose MarkLogic-9.0-3.1.x86_64.rpm
sudo dpkg -i marklogic_4.1-6_amd64.deb
sudo /etc/init.d/MarkLogic start
But when I tried the second one I got an error like this:
iama#learner:~$ sudo alien --to-deb --verbose MarkLogic-9.0-3.1.x86_64.rpmFile "MarkLogic-9.0-3.1.x86_64.rpm" not found.
I don't know how to proceed further. I just wanted to confirm, is there any official documentation to install MarkLogic 9 in ubuntu?
The error is "File Not Found"
Make sure the rpm file exists in the current directory with read privileges with the name given.
Make sure sudo is not changing to another directory.
To be certain, use an absolute file path.
Then, test with sudo ls -l file..
I have been trying to install Openstack on centos using devstack. When I run the script, I get the following error:
[vagrant#centos64 devstack]$ ./stack.sh
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 1 <<<
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 2 <<<
sudo: parse error in /etc/sudoers.d/50_stack_sh near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 1 <<<
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 2 <<<
sudo: parse error in /etc/sudoers.d/50_stack_sh near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 1 <<<
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 2 <<<
sudo: parse error in /etc/sudoers.d/50_stack_sh near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 1 <<<
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 2 <<<
sudo: parse error in /etc/sudoers.d/50_stack_sh near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 1 <<<
sudo: >>> /etc/sudoers.d/50_stack_sh: syntax error near line 2 <<<
sudo: parse error in /etc/sudoers.d/50_stack_sh near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
RDO repo not detected; installing
++ proxychains /usr/bin/yum.bin install http://rdo.fedorapeople.org/openstack-havana/rdo-release-havana.rpm
ProxyChains-3.1 (http://proxychains.sf.net)
Loaded plugins: fastestmirror
You need to be root to perform this command.
[Call Trace]
./stack.sh:224:die
[ERROR] ./stack.sh:224 Error installing RDO repo, cannot continue
Now, here is /etc/sudoers.d/50_stack_sh file:
[root#centos64 devstack]# cat /etc/sudoers.d/50_stack_sh
ALL=(root) NOPASSWD:ALL
Defaults: secure_path=/sbin:/usr/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin
I tried to edit it, but it says it's a read only buffer, even for root user. I tried to add vagrant user to the sudoers group by editing /etc/sudoers file, but it gave the same error as it is a read only buffer. How do I resolve this error?
The main problem that you need a password less sudo user to be able install devstack.
Try to run: devstack/tools/create-stack-user.sh
After that it should work.
To recap the context:
I have installed CentOS 7 (1503) minimal.
As root:
I ran the command:
git clone https://git.openstack.org/openstack-dev/devstack
I ran the command devstack/tools/create-stack-user.sh: it created a stack user and create the file /etc/sudoers.d/50_stack_sh. But that file has syntax error.
To fix it, I edit the file /etc/sudoers.d/50_stack_sh to have this content:
stack ALL=(ALL) NOPASSWD: ALL
Defaults secure_path=/sbin:/usr/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin
Defaults !requiretty
To force the saving with VIM, you need to type :w!
Hope it helps,
I had this problem as well. It wasn't a problem with the stack.sh script, as you can run something (as the stack user) like "sudo yum update" and it will produce the same problem.
It comes from a syntax error in the /etc/sudoers.d/50_stack_sh file. You can get away with running (as root)
echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
My stack.sh seems to be working well now
There is my way to fix it.
I cd to the /etc/sudoers.d/,and then delete the file 50_stack_sh.
It works,and now your user can good work.You can change to the user which you want to run devstack and run the script ./stack.sh .
Hope it helps!
I'm trying to install habitrpg locally but I keep getting a mongoDB error after typing node src/seed.js:
Error: failed to connect to [localhost:27017]
I saw on other questions with the same error people have suggested typing in 'mongod' and that fixes it by creating a local server. I get the error:
-bash: mongod: command not found
Can't figure out what's wrong. Any ideas?
Open CMD (In Windows) or terminal (In Ubuntu).
type command >cd PATH_FOR_MONGODB_BIN_FOLDER
cd C:\Program Files\MongoDB\Server\3.2\bin
for ubuntu command will be same :
cd /home/MongoDB/Server/3.2/bin
then type command >mongod --dbpath PATH_FOR_DATA_FOLDER
mongod --dbpath C:\data\db
For ubuntu command will be :
./mongod --dbpath /home/data/db
you can specify any folder as data folder.
Wait till CMD or Terminal shows "waiting for connections"
2016-09-01T21:38:33.170+0530 I NETWORK [initandlisten] waiting for connections on port 27017
Then open new CMD or terminal window.
type command >cd PATH_FOR_MONGODB_BIN_FOLDER ( same as step 3 )
cd C:\Program Files\MongoDB\Server\3.2\bin
Don't close previous window of cmd or teminal.
then run mongodb by typing "mongo" in windows or "./mongo" in ubuntu
mongo
For ubuntu
./mongo
After mongodb run successfully you can close previous CMD window.
You don't have MongoDB installed. Follow the directions for your system to install it: http://docs.mongodb.org/manual/installation/
From the habitRPG docs:
Before starting make sure to have MongoDB, NodeJS and npm and Git installed and set up.
I think that you don't have an environmental variable declared. Assuming that your MongoDB installation is C:\ProgramFiles\MongoDB\Server\YOUR_VERSION_NUMBER\, you should just add the bin folder path of that version of MongoDB to your PATH system environment variable.
Here's a link where you can find the way to do that without complications :
http://www.computerhope.com/issues/ch000549.htm
After installing MongoDb you have to add the directory "data\db" under the C:\ directory,
then you should start the mongod.exe
on windows open task manager || Ctrl + shift + ESC > select service tab > search for mongo db > right click > start service
I got this issue because I didn't have MongoDB. So I installed MongoDB and tried to run node application and it worked.
If you don't have MongoDB then follow below steps to install and enjoy
Commands :
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
$ echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
$ sudo apt-get update
$ sudo apt-get install -y mongodb-org
Then type mongo in terminal and if you will get console for mongo then it's done.
Type sudo pip3 install mongodb, then sudo pip3 install pymongo, then mongod.
I had the same problem on my Mac.
I updated my Homebrew files, after I reinstaled MongoDB in my terminal
brew tap mongodb/brew
and
brew install mongodb-community#5.
and I started mongo server
brew services start mongodb/brew/mongodb-community
After that I coud to commect.
my problem is the connectoon is down, run script:
brew services start mongodb-community
And up mongoDB Compass and works.
I ran mongodb install file and choose repair