I am trying to run brew uninstall postgres but I am getting these errors:
I used to have postgres.app and the enterprise install too.
Contents brew uninstall postgres
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
pwd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Error: The current working directory doesn't exist, cannot proceed.
Probably you are running that command from a directory that doesn't exist (or no longer named the wait it appears on the terminal) anymore. Why don't you try cd . or cd "$PWD" again and trying to run the command once again.
you are running the command in a directory that doesn’t exist, close the terminal and re-open it, or just restart your macOs. Never remove any directory before you restart OS.
Related
when I run command./config.sh --- while trying to setup GitHub runner on server I get this error
An error occurred: Permission to read the directory contents is required for '/var/www/usr/data/actions-runner' and each directory up the hierarchy. Access to the path '/var/www' is denied.
folder /var/www/ is owned by root, and usr running /.configure command has proper rights on /usr/data/action-runner
I tried running above command after adding "usr" to sudo then it tells me command must not run as sudo. So there is no winning here. I personally do not want to run command as sudo so I didn't try to figure out this error.
But, burning question I have is why does this configure script cares if it has read permission on /var/www/
This kind of does not addup
You can run sudo chmod 0755 /var/www, which fixed the problem for me
I have created a model now I am using this command to restart the module
but it is showing this error
using this command to restart module
odoo start --config=/etc/odoo/odoo.conf -i HelloModule
the error is
odoo: error: The config file '/etc/odoo/odoo.conf' selected with -c/--config doesn't exist or is not readable, use -s/--save if you want to generate it
the screenshot of the file which error shows that it is not available
Try adding readable permission to config file by chmod command
sudo chmod +r etc/odoo/odoo.conf
Check this link to know more about modifying file permissions.
Without changing directory to \MongoDB\bin\, when I call:
mongod -v
I get:
'mongod' is not recognized as an internal or external command, operable
program or batch file.
When I call the same command from \bin\ it launches the server just like I'm calling:
mongod
It is the same case with 'mongo' and 'mongos'.
I added the \bin\ path to the environment variables thinking it will help but it didn't.
To clarify with an example, to get the version of Ruby, I can call:
ruby -v
Why can't I do the same with MongoDB?
First add location of MongoDB's bin folder to PATH env variable. This is required because it is the place where mongod.exe is stored.
For example, if MongoDB 4.0 is in your Program Files, add "C:\Program Files\MongoDB\Server\4.0\bin" to PATH for all system users.
Then try using :
mongod --version
I am getting this error constantly while i am trying to install mongod using a configuration file. So, I am looking at this tutorial on Pluralsight on mongodb. The person's programming environment going as smoothly as it can. However, i am encountering several problems. First of all, i am trying to setup a different logpath and database path.This is the basic layout of the conf file
dbpath=/Pluralsight/db
logpath=/Pluralsight/mongod.conf
verbose=vvvvv
My syntax:
c:\Program Files\MongoDB\Server\3.0\bin\mongod -f c:\Pluralsight\mongod.conf
//Trying to run mongod using a configuration file
When i press enter, i am supposed to get a message that says everything is being directed to this new logfile and a new database. I do not get any message. However, that did not stop it from creating a log file with information in the expected folder. Now, I proceed to install mongod as a service. This is when i type
C:\Program Files\MongoDB\Server\3.0\bin\mongod -f c:\Pluralsight\mongod.conf --install
//using the configuration file to install mongod as a service
I get an error:
Failed Global Initialization: BadValue logpath requires an absolute
file path with windows services
I have no idea how to fix this!
I was having the same problem with MongoDB's instructions because I was using relative path in the CLI for my mongo.cfg once I had navigated to the MongoDB bin:
mongod.exe --config mongod.cfg --install.
Instead I needed to specify the config file's absolute path:
mongod.exe --config "C:\Program Files\MongoDB\Server\3.0\bin\mongod.cfg" --install
The error message spells out the problem. Your MongoDB confguration file has a relative path, not an absolute path.
Try setting the logpath as follows
logpath=c:/Pluralsight/mongod.log
I got the same problem. After I read this doc, resolved.
https://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows
Open an Administrator command prompt.
Press the Win key, type cmd.exe, and press Ctrl + Shift + Enter to run the Command Prompt as Administrator.
Execute the remaining steps from the Administrator command prompt.
Create directories.
Create directories for your database and log files:
mkdir c:\data\db
mkdir c:\data\log
Create a configuration file.
Create a configuration file. The file must set systemLog.path. Include additional configuration options as appropriate.
For example, create a file at C:\mongodb\mongod.cfg that specifies both systemLog.path and storage.dbPath:
systemLog:
destination: file
path: c:\data\log\mongod.log
storage:
dbPath: c:\data\db
Install the MongoDB service.
Important
Run all of the following commands in Command Prompt with “Administrative Privileges”.
Install the MongoDB service by starting mongod.exe with the --install option and the -config option to specify the previously created configuration file.
"C:\mongodb\bin\mongod.exe" --config "C:\mongodb\mongod.cfg" --install
To use an alternate dbpath, specify the path in the configuration file (e.g. C:\mongodb\mongod.cfg) or on the command line with the --dbpath option.
If needed, you can install services for multiple instances of mongod.exe or mongos.exe. Install each service with a unique --serviceName and --serviceDisplayName. Use multiple instances only when sufficient system resources exist and your system design requires it.
Start the MongoDB service.
net start MongoDB
Stop or remove the MongoDB service as needed.
To stop the MongoDB service use the following command:
net stop MongoDB
To remove the MongoDB service use the following command:
"C:\mongodb\bin\mongod.exe" --remove
echo logpath=C:/myProgra/MongoDB/log/mongo.log > "C:\MyProgram\MongoDB\mongod.cfg"
C:\myprogram\MongoDB\Server\3.0\bin\mongod.exe --config "C:\myProgram\MongoDB\mongod.cfg" --install
I ran into the same problem. But I could resolve it by updating the paths as follows. I could see the problem is with Forward and backward slashes in file paths.
mongod.conf (instead of giving the relative path provide absolute path and also make sure you have "/" instead of "\")
dbpath= C:/mongolearning/db
logpath= C:/mongolearning/mongo-server.log
verbose=vvvvv
and then go to Command prompt:
C:\Program Files\MongoDB\Server\3.2\bin>mongod -f "C:\Program Files\MongoDB\Server\3.2\bin\mogod.conf" --install
and then
C:\Program Files\MongoDB\Server\3.2\bin>net start mongodb
Boom it started.
The MongoDB service is starting.
The MongoDB service was started successfully.
I faced the same problem while installing the MongoDB service by specifying the logpath and dbpath flags directly from the command line.
mongod --install --logpath='<my log path>' --dbpath='<my db path>'
It turned out that the logpath and dbpath values had to be wrapped inside double quotes (i.e. "") instead of single qoutes, or otherwise no quotes at all if the paths are without any spaces in the absolute directory path.
So the following did the trick for me:
mongod --install --logpath="<my log path>" --dbpath="<my db path>"
Notice the paths wrapped within double qoutes.
Thanks for the suggestions guys. I just went with MongoDB's instructions on their website on installing mongod as a service in windows instead of Pluralsight tutorial's and it went well.
there can't be quotation marks in your configure file .
way like this is wrong:
dbpath="D:/Program Files/MongoDB/Data/DB"
logpath="D:/Program Files/MongoDB/Data/Log/mongo.log"
downside is right:
dbpath=D:/Program Files/MongoDB/Data/DB
logpath=D:/Program Files/MongoDB/Data/Log/mongo.log
In the config file use absolute path instead of relative path for dbpath & logpath as like below and run the command to install the MongoDB service.
dbpath = c:/Pluralsight/db (instead of /Pluralsight/db)
logpath = c:/Pluralsight/mongo-server.log (instead of Pluralsight/mongo-server.log)
verbose = vvvvv
Command to install the MongoDB service is like:
mongod -config "C:\Pluralsight\mongod.conf" --install
I got the same error
**Failed Global Initialization: BadValue logpath requires an absolute file path with windows services**
as I was specifying log path folder in mongo.config but I have to specify a log file
dbpath=C:\Program Files\MongoDB\Server\3.4\data\db
logpath=C:\Program Files\MongoDB\Server\3.4\log
diaglog=3
i changed my log file to
dbpath=C:\Program Files\MongoDB\Server\3.4\data\db
logpath=C:\Program Files\MongoDB\Server\3.4\log\mongo.log
diaglog=3
and after that this command solved my problem. hope this workfor you as well.
mongod.exe --config "C:\Program Files\MongoDB\Server\3.4\mongo.config" --install
then finally
net start MongoDB
I have been trying to install PostgreSQL 9.2 for the last couple of days. I guess I tried everything that I could find online but the service still will not start. I am currently running Windows 7 SP1. I used to have PostgreSQL 8.3 installed and working fine but a couple of weeks ago I decided to uninstall it. I thoroughly uninstalled it (delete the postgres user and the data file) and now every time I try to install any version I get this non-fatal error at the end of the setup when the loading of the database modules takes place.
I managed to see that the postgresql service does not start or as windows puts it starts then stops.
This is the relevant part of the log file of the installation:
Successfully processed 771 files; Failed processing 0 files
initcluster.vbs ran to completion
Script stderr:
Configuring database server startup...
Executing cscript //NoLogo "C:\Program Files (x86)\PostgreSQL\9.2\installer\server\startupcfg.vbs" 9.2 "NT AUTHORITY\NetworkService" "****" "C:\Program Files (x86)\PostgreSQL\9.2" "C:\Program Files (x86)\PostgreSQL\9.2\data" "postgresql-9.2"
Script exit code: 0
Script output:
startupcfg.vbs ran to completion
Script stderr:
Creating menu shortcuts...
Executing cscript //NoLogo "C:\Program Files (x86)\PostgreSQL\9.2\installer\server\createshortcuts.vbs" 9.2 "postgres" 5432 "PostgreSQL 9.2 (x86)" "C:\Program Files (x86)\PostgreSQL\9.2" "C:\Program Files (x86)\PostgreSQL\9.2\data" "postgresql-9.2"
Script exit code: 0
Script output:
Start FixupFile(C:\Program Files (x86)\PostgreSQL\9.2\scripts\serverctl.vbs)...
Opening file for reading...
Closing file (reading)...
Replacing placeholders...
Opening file for writing...
Closing file...
End FixupFile()...
Start FixupFile(C:\Program Files (x86)\PostgreSQL\9.2\scripts\runpsql.bat)...
Opening file for reading...
Closing file (reading)...
Replacing placeholders...
Opening file for writing...
Closing file...
End FixupFile()...
createshortcuts.vbs ran to completion
Script stderr:
Starting the database server...
Executing cscript //NoLogo "C:\Program Files (x86)\PostgreSQL\9.2\installer\server\startserver.vbs" postgresql-9.2
Script exit code: 0
Script output:
Starting postgresql-9.2
Service postgresql-9.2 started successfully
startserver.vbs ran to completion
Script stderr:
Loading additional SQL modules...
Executing cscript //NoLogo "C:\Program Files (x86)\PostgreSQL\9.2\installer\server\loadmodules.vbs" "postgres" "****" "C:\Program Files (x86)\PostgreSQL\9.2" "C:\Program Files (x86)\PostgreSQL\9.2\data" 5432
Script exit code: 2
Script output:
Installing the adminpack module in the postgres database...
Executing 'C:\Users\George\AppData\Local\Temp\radA5996.bat'...
psql: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
Failed to install the 'adminpack' module in the 'postgres' database
loadmodules.vbs ran to completion
Script stderr:
Program ended with an error exit code
Error running cscript //NoLogo "C:\Program Files (x86)\PostgreSQL\9.2\installer\server\loadmodules.vbs" "postgres" "****" "C:\Program Files (x86)\PostgreSQL\9.2" "C:\Program Files (x86)\PostgreSQL\9.2\data" 5432 : Program ended with an error exit code
[10:34:28] Write the data directory to the ini file...
[10:34:28] Write the port number, service ID, locale and superuser to the ini file...
[10:34:28] Write ServiceID(postgresql-9.2) to registry/ini...
[10:34:28] Write Superuser to ini file and windows registry...
[10:34:28] Write Service Account to ini file and windows registry...
[10:34:28] Write the server description to the ini file...
[10:34:28] Write the server branding to the ini file...
[10:34:28] Write the 'whether stack-builder is disabled or not' to the ini file...
[10:34:29] Finished running post-installation/upgrade tasks.
Creating Uninstaller
Creating uninstaller 25%
Creating uninstaller 50%
Creating uninstaller 75%
Creating uninstaller 100%
Installation completed
I had the same problem. At one point it needs to get a package via internet connection. This is not right because the install package s/b able to install without a connection but that's how it is. Your firewall is blocking the install. Here's what you need to do:
Shut Down Windows Firewall (Control Panel\All Control Panel Items\Windows Firewall\Customize Settings)
If you use this great program shut down Firewall Control (Exit from task bar or Use Task Mgr to kill UI & Service - 2 items)
For downloading Selected Packages:
Shut Down Key Protection Services:
Shut Down Base Filtering (Leaves you unprotected! - Dependencies will.restart when BFE is restarted)
Base Filtering Engine
IKE and AuthIP IPsec Keying Modules
IPsec Policy Agent
ICS
...
Don't forget to restart all protections.
I faced similar issues of Pg 9.2.4 installer on Win7 x64. It turned out that
'adminpack' module did not load due to stopped postgres service. It starts and then
terminates almost immediately. You may check this running Pg service manually to see if it
can load. If it cant this may be from missing config files from "data" directory. initdb
command cant create valid cluster and copy corresponding *.conf files. I tried to dig into
details and the installer has complicated checks of user permissions which could fail in your (and my) case.
Just try installing Pg from zip binaries. It took only the following commands (less than
20 minutes). Original article.
1) Create "postgres" windows user (with no admin rights) and granted it full privileges on
your Pg folder and "data" folder. To do this from command line run "cmd" as administrator (press Ctrl-Shift-Enter instead of Enter to run "cmd") and issue: "net user postgres
/add". Then right click on your Pg folder (and "data" folder if it is outside) and grant all permissions to "postgres".
2) Install Microsoft Visual C++ 20xx Redistributable Package which comes with one click Pg
installer (vcredist_x64.exe from Users\"your user"\AppData\Local\Temp\postgresql_installer_**** - folder created by one click Pg installer on first run).
3) Unzip Pg binaries to your Pg folder and "cmd" as administrator to its bin directory.
4) Run to init cluster: initdb -U postgres -A password -E utf8 -W -D "path to your Pg folder"\data
5) Run to install windows service: pg_ctl register -N "postgresql" -U ".\postgres" -D "path to your Pg folder/data" -w
6) Open windows services list and open "postgresql" service properties. Then set password for windows user postgres there. Try starting your new Pg service. If it starts then everything should be ok.
7) Open bin\pgAdmin3, connect to local server and open postgres database and its metadata. You should see a complaint about missing admin services and a propose to correct this. Just press Ok - 'adminpack' should be installed.
Install postgres only from windows account written in english. For example installation from user "Аня" always fail.
Solution is to shutdown the windows firewall before installing. After the installation you can enable the windows firewall.
Try installing outside of "C:\Program Files" which has special permissions on Windows.
We had similar issues and simply by installing into C:\Postres92 everything works right out of the box.
I had the same problem, caused by restricted access rights in the Program Files directory, due to the fact that the data directory was C:\Program Files (x86)\PostgreSQL\9.2\data
Changing the data directory to C:\ProgramData\PostgreSQL\9.2\data resolved the problem.