I am not so into Linux and I have the following problem.  I was installing RedMine on a remote Ubuntu Server via SSH, following the official tutorial:   The installation process is pretty simple but when I was performing this statment:  sudo apt-get install redmine redmine-mysql   I lost connection...so I come back into my server reconnecting to it...so I perform again this command but now I am obtaining this error message:  *** System restart required *** Last login: Fri Nov 11 11:57:11 2016 from 91.253.121.46 root@Betrivius-VPS:~# apt-get install redmine redmine-mysql E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? root@Betrivius-VPS:~#   Reading online it seems that it means that the prvious installation process is not ended.  So I don't know if I can retrieve it in some way or abort it. When I log into my remote server appear the message System restart required. I don't know if this message is causated by this situation or not and I don't know if restart my server will solve this issue.  So what is the best solution for this problem?
3087
I get this error when trying to use apt-get:  E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?     How can I fix this?
74297
This conundrum is caused by running git pull from root.   There are various reasons for me to do so... I want my device to update code when booting up, and rc.local is run by root.  It all works mostly fine (npm install tends to fail when run by root, but that's a whole 'nother topic), the problem arises when I try to use the git repository with a non-root user afterward... some of the git files have been written by root, so now I can't use it anymore (permission denied).   So I'd like to recursively chown it back but there doesn't seem to be anything that really works on all of the little git files. I tried the -R flag and ./**/* path.  My guess is that neither of those techniques descend into dot-directories.
3943
When we install/remove/update packages or make any changes which require administrative privileges we are prompted for the password of admin user who has the sudo privileges - this happens both via GUI and terminal.    However, if we try to shutdown and restart via terminal, it complains that we need to be root:  $ reboot reboot: Need to be root  $ shutdown now shutdown: Need to be root   But we are never asked for a password when we perform these actions via the cog-wheel at top right.    Why is there this discrepancy?
34562
Last night I was updating my Ubuntu 10.04 to either 11.04 or 12.04 (I'm not entirely sure which one it was, but I think it was 11.04) and I left it overnight to finish. When I came down in the morning, I noticed that the computer hadn't barely begun installing the updates! The update thing said that my computer was on the installation step, but it was still preparing the libc bin (or whatever its called) . It's like the first part of the step installing the upgrades. So, I stupidly restarted the computer, and when it rebooted, I got five options on a purple screen:  Ubuntu, with Linux 3.0.0-28-generic Ubuntu, with Linux 3.0.0-28-generic (recovery mode) Previous Linux versions Memory test (memtest86+) Memory test (memtest86+, serial console 115200)   Long story short, not matter which way I enter Ubuntu to try and reinstall the updates using the root thing (it's like terminal) after I enter sudo apt-get update it basically said it failed to fetch every url link, and it then says:  W: Some index files have failed to download. They have been ignored, or old ones used instead. W: Not using locking for read only lock file /var/lib/dpkg/lock E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.   So, I entered sudo dpkg --configure -a, and it says:  dpkg: error: unable to access dpkg status area: Read-only file system"   I'm left like wtf, and I really just some guidance here. I just got this laptop, and I can not afford a new one if I broke this one.
14163
I'm trying to install MySQL on Ubuntu Natty without the password prompt. However, I keep getting prompted for a password at some stage after the main installation.  Also, when I do enter what I believe should be my password (mymysqlpass), it gives me an access denied notice. Then when the script terminates, I can login to mysql without a password i.e. mysql -uroot, which should not happen.  #!/bin/bash #This script installs mysql (latest build) #Install MYSQL Server mysql_pass=mymysqlpass export DEBIAN_FRONTEND=noninteractive  debconf-set-selections &lt;&lt;&lt; 'mysql-server-5.1 mysql-server/root_password password '$mysql_pass'' debconf-set-selections &lt;&lt;&lt; 'mysql-server-5.1 mysql-server/root_password_again password '$mysql_pass'' apt-get -y install mysql-server #Configure Password and Settings for Remote Access cp /etc/mysql/my.cnf /etc/mysql/my.bak.cnf ip=`ifconfig eth0 | grep "inet addr"| cut -d ":" -f2 | cut -d " " -f1` ; sed -i "s/\(bind-address[\t ]*\)=.*/\1= $ip/" /etc/mysql/my.cnf mysql -uroot -e "UPDATE mysql.user SET Password=PASSWORD('"$mysql_pass"') WHERE User='root'; FLUSH PRIVILEGES;" sleep 10 mysql -uroot -p$mysql_pass -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '"$mysql_pass"'; FLUSH PRIVILEGES;" #Restart service mysql restart echo "MySQL Installation and Configuration is Complete."
83208
I did: sudo apt-get update  I got this: Reading package lists... Done E: Could not get lock /var/lib/apt/lists/lock. It is held by process 1131 (packagekitd)  N: Be aware that removing the lock file is not a solution and may break your system.  E: Unable to lock directory /var/lib/apt/lists/  I used to just remove the lock file, but I've never seen that note before (did it break my system?)?? What do I do?
112698
I'm using 13.04 for the first time and I am using proxy base server that's why I can't download anything while I use apt-get update then it shows this message  coolmonter@coolmonter-HP-ProBook-4431s:~$ apt-get update 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?   any suggestion
83653
Question: What is the best way to recover mysql (or worst case: migrate away) from a "chmod -R 777 /" with databases intact?  System: Ubuntu 12.04 LTS MySQL 5.5.24 64 bit Amazon EC2 cloud server.  Background: Attempting to recover (or at least recover data from) a system which had this done to it:        chmod -R 777 /   No point in worrying about the why.  It was a manager with too much access and too little experience who likes to swim in deep waters.  It was a pure accident on his part, not actually meaning to hit enter when he did.  I have recovered much of the system, but am really hung up on getting mysql working again.  I have already worked through such pages as:         Have already done this:        sudo chmod 644 my.cnf     chown mysql:mysql my.cnf   At which point attempting to start mysql:        sudo service mysql start   Produces this output in syslog:      Apr 12 20:51:42 ip-10-10-25-143 kernel: [18632541.774742] type=1400 audit(1365799902.306:41): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=18210 comm="apparmor_parser"     Apr 12 20:51:42 ip-10-10-25-143 kernel: [18632541.964496] init: mysql main process (18214) terminated with status 1     Apr 12 20:51:42 ip-10-10-25-143 kernel: [18632541.964542] init: mysql main process ended, respawning     Apr 12 20:51:43 ip-10-10-25-143 kernel: [18632542.959796] init: mysql post-start process (18215) terminated with status 1     Apr 12 20:51:43 ip-10-10-25-143 kernel: [18632543.002041] type=1400 audit(1365799903.534:42): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=18238 comm="apparmor_parser"     Apr 12 20:51:43 ip-10-10-25-143 kernel: [18632543.098490] init: mysql main process (18242) terminated with status 1     Apr 12 20:51:43 ip-10-10-25-143 kernel: [18632543.098536] init: mysql main process ended, respawning     Apr 12 20:51:43 ip-10-10-25-143 kernel: [18632543.140706] init: mysql post-start process (18244) terminated with status 1     Apr 12 20:51:43 ip-10-10-25-143 kernel: [18632543.158681] type=1400 audit(1365799903.690:43): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=18258 comm="apparmor_parser"     Apr 12 20:51:43 ip-10-10-25-143 kernel: [18632543.285087] init: mysql main process (18262) terminated with status 1     Apr 12 20:51:43 ip-10-10-25-143 kernel: [18632543.285133] init: mysql respawning too fast, stopped   What I read from that is mysql is terminating with a status 1, and it loops a few times trying to start up and gets stopped from doing that after too many attempts.  I've looked into status 1 but haven't found solutions that seem applicable.
96562
I tried restarting the Mysql server but its not working for me. I am sure the server is running and the permissions on the folder /var/lib/mysql/ are correct (777).  When i tried to open the file mysql.sock, its giving me an error saying the file may be corrupt.  Please help me to log on to the mysql server.
64915
I'm trying to install phpMyAdmin using sudo apt-get install phpmyadmin but encountering this error  Err http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main mysql-common all 5.5.34-0ubuntu0.12.04.1   404  Not Found [IP: 194.169.254.10 80] Err http://security.ubuntu.com/ubuntu/ precise-security/main mysql-common all 5.5.34-0ubuntu0.12.04.1   404  Not Found [IP: 91.189.91.15 80] Err http://security.ubuntu.com/ubuntu/ precise-security/main libmysqlclient18 i386 5.5.34-0ubuntu0.12.04.1   404  Not Found [IP: 91.189.91.15 80] Err http://security.ubuntu.com/ubuntu/ precise-security/main mysql-client-core-5.5 i386 5.5.34-0ubuntu0.12.04.1   404  Not Found [IP: 91.189.91.15 80] Err http://security.ubuntu.com/ubuntu/ precise-security/main mysql-client-5.5 i386 5.5.34-0ubuntu0.12.04.1   404  Not Found [IP: 91.189.91.15 80] Err http://security.ubuntu.com/ubuntu/ precise-security/main mysql-client all 5.5.34-0ubuntu0.12.04.1   404  Not Found [IP: 91.189.91.15 80] Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-common_5.5.34-0ubuntu0.12.04.1_all.deb  404  Not Found [IP: 91.189.91.15 80] Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/libmysqlclient18_5.5.34-0ubuntu0.12.04.1_i386.deb  404  Not Found [IP: 91.189.91.15 80] Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-client-core-5.5_5.5.34-0ubuntu0.12.04.1_i386.deb  404  Not Found [IP: 91.189.91.15 80] Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-client-5.5_5.5.34-0ubuntu0.12.04.1_i386.deb  404  Not Found [IP: 91.189.91.15 80] Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.5/mysql-client_5.5.34-0ubuntu0.12.04.1_all.deb  404  Not Found [IP: 91.189.91.15 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?   What could be the issue here? How do I solve it?
88836
When I type a command not found in a PATH in ubuntu, I get something like this:  $ rdesktop The program 'rdesktop' is currently not installed.  You can install it by typing: sudo apt-get install rdesktop   I believe it's a script that looks up the APT archives and suggest an installation package. I'd like to change it so that it offers me to download it at the press of a 'y'. Two questions:  1) Where is the file located?  2) If I just add the install line in the trivial way, it's going to complain that I'm not a root and will fail (because the rdesktop was ran as a mundane user). How do I make it ask for a password and use it to get root access?
74984
when I try to apt-get update I'm getting the below error,  E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/
102040
I have the following virtual host setup:  RailsBaseURI /  &lt;VirtualHost *:80&gt;     ServerName mydomain     DocumentRoot /usr/share/redmine/public      Alias /evaluation /home/user/evaluation/      DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm      &lt;Directory /usr/share/redmine/&gt;         Options +FollowSymLinks Indexes         AllowOverride All         Order allow,deny         Allow from all     &lt;/Directory&gt;      &lt;Directory /home/user/evaluation/&gt;         Options +FollowSymLinks Indexes         AllowOverride All         Order allow,deny         Allow from all     &lt;/Directory&gt; &lt;/VirtualHost&gt;   When I go to mydomain/evaluation, I get an error. But when I go to mydomain/evaluation/index.php, it works. What am I doing wrong here?  Update: I have confirmed that the request is routed to Redmine instead of being handled by Apache. Any ideas?
36928
This is a follow-on question to the  question.  If I want to execute a command on the remote machine that runs in the background on that machine, how do I get the ssh command to return?  When I try to just include the ampersand (&amp;) at the end of the command it just hangs.  The exact form of the command looks like this: ssh user@target &quot;cd /some/directory; program-to-execute &amp;&quot;  Any ideas?  One thing to note is that logins to the target machine always produce a text banner and I have SSH keys set up so no password is required.
32133
I'm running in circles currently, trying to fix some mysql problem.  I couldn't use apt-get for a while now, because it always stuck at the line Setting up mysql-server-5.6 (5.6.27-0ubuntu0.15.04.1) ... and didn't let me do anything. So I tried to reinstall mysql, purging it. While I was able to remove mysql-server and mysql-client eventually, I'm still unable to purge mysql-common. Obviously, I managed to corrupt something, but how can I get my system back and running at this point?  ...:~# apt-get purge mysql-common Reading package lists... Done Building dependency tree        Reading state information... Done The following packages will be REMOVED:   mysql-common* 0 upgraded, 0 newly installed, 1 to remove and 5 not upgraded. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] Y (Reading database ... 423600 files and directories currently installed.) Removing mysql-common (5.6.27-0ubuntu0.15.04.1) ... Purging configuration files for mysql-common (5.6.27-0ubuntu0.15.04.1) ... update-alternatives: error: /var/lib/dpkg/alternatives/my.cnf corrupt: invalid status dpkg: error processing package mysql-common (--purge):  subprocess installed post-removal script returned error exit status 2 Errors were encountered while processing:  mysql-common E: Sub-process /usr/bin/dpkg returned an error code (1)   -  ...# sudo dpkg -P --force-all mysql-common (Reading database ... 424733 files and directories currently installed.) Removing mysql-common (5.6.27-0ubuntu0.15.04.1) ... Purging configuration files for mysql-common (5.6.27-0ubuntu0.15.04.1) ... update-alternatives: error: no alternatives for my.cnf dpkg: error processing package mysql-common (--purge):  subprocess installed post-removal script returned error exit status 2 Errors were encountered while processing:  mysql-common   -  ...:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 15.04 Release:    15.04 Codename:   vivid   My goal is to just get it back and running again (mysql).
15102
What can I do to configure SSH on both client and servers to prevent Write Failed: broken pipe errors? It often occurs if you sleep your client computer and resume later.
101940
I just installed appache, MySQL and PHP, suring my installation, I was prompted for a MySQL root user password, but when I start my MySQL, it pops the error, and I just can't seem to find a way around it, most solutions I've read doesn't solve it, moreover, I found out that the /var/run/mysqld path doesn't even exist, my php also needs the socket to connect to my Database.