postgresql command not working; Error: invalid option '-o' - postgresql

I am trying to fix this previous error when I am unable to find the PostgreSQL client library, however, when I run the suggested command:
ridk exec sh -c "pacman -S ${MINGW_PACKAGE_PREFIX}-postgresql"
I get this error. Not sure how to fix, any help is appreciated
error: invalid option '-o'
I tried the other suggestions such as:
gem install pg -- --with-pg-config=/path/to/pg_config
But I still get the same error.

Related

Error: Error: Failed to download metadata for repo 'advanced-virtualization': Cannot prepare internal mirrorlist: No URLs in mirrorlist

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.

How to use mongoimport command in mongodb?

I am trying to run ./mongoimport -d crunchbase -c companies companies.json,
but I am getting the following error:-
open companies.json: no such file or directory is found
I am running the above command from
mongod/bin
Can anyone suggest me what error I am doing?

What does Usage: psql [wait] mean?

I'm trying to use psql version 9.6 on Mac OSX 10.11 and installed from the EnterpriseDB installer but I'm getting the following error:
MacBook-Pro:local me$ which psql
/usr/local/bin/psql
MacBook-Pro:local me$ /usr/local/bin/psql -h localhost; echo "Error code: $?"
Usage: /usr/local/bin/psql [wait]
Error code: 127
As you can see, I'm simply trying to connect to localhost and I'm getting a usage error despite following the syntax from the manual.
What is happening here?
Your bash is returning the error code 127: command not found.
See 127 Return code from $? for more details about this bash code.
Make sure that psql is in the directory you're trying to access.
Simple mistake - /usr/local/bin/psql was a symlink for /Library/PostgreSQL/9.6/scripts/runpsql.sh which doesn't accept any arguments... it's basically EnterpriseDB's shell script wrapper around the actual actual binary which is /Library/PostgreSQL/9.6/bin/psql.
I just needed to point psql to the real executable and not that shell script.

Nohup command cause an error

I follow some tutorial about queuing on laravel and run it on the background, with this command
sudo nohup php artisan queue:work --daemon --tries=3
After awhile, i want to update my code, with command
git add .
but i got this error
error: open("nohup.out"): Permission denied
error: unable to index file nohup.out
fatal: adding files failed
I assume it comes from above command.
How can i solve this?
thanks man, really confused now!
Sorry for late,
Can you see that file to include? I say if you use:
git status
Then if you cant, try with chmod 777 to give all permissions.

Build of docker image with centos:6.6 fails when trying to update repo

I have the following simple Dockerfile:
FROM centos:6.6
USER root
RUN yum clean all
RUN yum update
And I am trying to build it as usual:
docker build -t myimage/hadoop .
But I have the following error and I can't find the solution:
Error: Cannot find a valid baseurl for repo: base Could not retrieve
mirrorlist
http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os&infra=stock
error was 14: PYCURL ERROR 6 - "Couldn't resolve host
'mirrorlist.centos.org'" INFO[0005] The command "/bin/sh -c yum
update" returned a non-zero code: 1
Any help or reference to solve the problem would be very helpful.
EDIT: I tried the solution given in this post but with no results.
Could you try add "-y" to the ""yum update"?
RUN yum update -y