So I am trying to make an irc bot using libircclient. To do this I need the c++ libraries.
I do this by using
sudo apt-get install g++ libcurl4-openssl-dev
The problem is when I do this I get a ton of errors saying
Could not resolve 'security.ubuntu.com' and variations of that
So I typed in apt-get update and got these errors
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
Before I even typed in my password I did get this error though
sudo: unable to resolve host
Result of Hostname -
DESKTOP-OEHHKKI
/etc/hostname
bash: /etc/hostname: Permission denied
Your /etc/hostname has been messed up, in order to fix it:
1. Open a text editor with root permissions: sudo -H gedit /etc/hostname
And edit the opened file to ONLY contain your machine name, which you can figure out running hostname.
2. You also need to modify this file /etc/hosts, using the same method sudo -H gedit /etc/hosts, so that it looks like:
127.0.0.1 localhost
127.0.1.1 YOUR-MACHINE-NAME
You can use sudo even if the message unable to resolve host appears. Just enter your password as usual and hit Enter.
3. Reboot.
Related
I have installed the Postgres v-12 using this blog on my ubuntu 20.04. After installing that when I run the command
pg_ctlcluster 12 main start
I got the below error
Insecure directory in $ENV{PATH} while running with -T switch at
/usr/bin/pg_ctlcluster line 398.
To fix this error I tried to give permission 750 to /bin directory as per the blog and followed the rest of the steps mentioned there. So when I run the command su postgres I gotthe below error
su: failed to execute /bin/bash: Permission denied
I have tried many blogs but didn't get any success.
Can anyone help me to run the Postgres?
I'm trying to write a command on mac terminal using the root, but it shows me that the permission denied, when I use the sudo it shows that the command not found
can any one please help me
aftheers-MacBook-Air:scripts root# ./ArduinoWifiShield_upgrade.sh
-sh: ./ArduinoWifiShield_upgrade.sh: Permission denied
You have to make the file executable:
chmod +x ArduinoWifiShield_upgrade.sh
To avoid permission denied prompt, type this command and continue
sudo su
Install the packages in this admin mode,
then go back to normal mode
exit
I am working on installing another version of ruby on another server which is CentOS 6.7 When while trying to configure ruby within the tmp directory I receive a:
sudo: unable to execute ./configure: Permission denied
Here is exactly what I am doing leading up to this:
mkdir /tmp/ruby && cd /tmp/ruby
curl --progress ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz | tar xz
cd ruby-2.1.2
./configure --disable-install-rdoc <!-- here is were we fail with permission denied
I am currently logged in as root. I have played around with changing my file permissions and that did not seem to help at all.
Any suggestions?
From this link it appears /tmp is mounted as read-only.
Open /etc/fstab, find the line that mounts your /tmp dir, and remove the noexec flag. Then remount the filesystem (or simply restart your system).
As a side note, you will also want to avoid running ./configure and make as root user. Only when it comes to run make install should you run as root.
I just downloaded mongodb via homebrew. When I tried starting it by mongod it said that I didn't have the data/db folder for it. I made the folder via sudo command from another stackoverflow page. Now the error that I'm getting is:
exception in initAndListen: 10309 Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating
I'm not sure why it's asking me if another instance of mongod is running because I only have one bash shell open.
Any tips would be awesome. Thank you!
Okay, I figured it out. The command after sudo mkdir -p /data/db is
sudo chown $USER /data/db
I just setup a vagrant box using laravel/homestead on Mac OS 10.9. I get the following error after I connect via SSH:
-bash: /home/vagrant/.bash_aliases: Permission denied
Haven't seen this when I provisioned on my Windows setup. What could be causing it?
To fix this I just did the following, though I can't figure why this was necessary to begin with:
sudo chown $USER:$USER ~/.bash_aliases