could not open lock file /var/lib/dpkg/lock [closed] - unix

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I'm getting error as below when tried to install a software on ubuntu in VM.
I could download any software if i'm a root user. But i forget my password now. Is there any way to renew the password of the root without uninstalling. please help.
could not open lock file /var/lib/dpkg/lock -open (13:permission denied)
unable to lock the administration directory (/var/lib/dpkg) , are you root?

Have a peek at This Link there is but you need to boot into single user mode (it is possible, but if this is a virtual then you'll need access to the host machine. If you don't have access to the host machine then I'm afraid you're out of luck :|

I assume your bootloader is Grub (likely, as you're using Ubuntu), so try pressing space (any key should work, even Ctrl) during bootup. Than, press e to edit the current boot entry, move the cursor to the end of the line which has kernel in it, and add init=/bin/bash. Press Ctrl-X and wait until shell prompt. Than, do a mount -o remount,rw /. Now you have a root account on a writable root partition. Do passwd, set the password, do mount -o remount,ro / and reboot. That's it.

Sometimes a simple reboot works for it. Try it before using any other options.

Related

AWS EC2 Rstudio Server Error Occured During Transmission [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
After over a month, I have managed to piece together how to setup an AWS EC2 server. It has been very hard to upload files as there are very conservative (size) limits when done via the upload button in Rstudio Server. The error message when this is attempted is "Unexpected empty response from server".
I am not unique in this respect e.g. Trouble Uploading Large Files to RStudio using Louis Aslett's AMI on EC2
I have managed to use the following commands through putty and this has allowed me to upload files via either filezilla or winscp.
sudo chown -R ubuntu /home/rstudio
sudo chmod -R 755 /home/rstudio
Once I use these commands and log out, I can no longer access rstudio on the instances in future logins. I can relogin to my instances via my browser, but I get the error message:
Error Occurred During Transmission
Everything is fine other than once I use Putty I lose browser access to my instances.
I think this is because the command is change of ownership or similar. Should I be using a different command?
If I don't use a command I cannot connect between filezilla/winscp and the instance.
If anyone is thinking of posting a comment that this should be closed as it is a hardware issue, I don't have a problem with hardware. I am interested in the correct coded commands.
Thank you :)
Ok so eventually I realised what was going on here. The default home directory size for AWS is less than 8-10GB regardless of the size of your instance. As this as trying to upload to home then there was not enough room. An experienced linux user would not have fallen into this trap, but hopefully any other windows users new to this who come across this problem will see this. If you upload into a different drive on the instance then this can be solved. As the Louis Aslett Rstudio AMI is based in this 8-10GB space then you will have to set your working directory outside this, the home directory. Not intuitively apparent from Rstudio server interface. Whilst this is an advanced forum and this is a rookie error I am hoping no one deletes this question as I spent months on this and I think someone else will too.
Don't change the rights of /home/rstudio unless you know what you are doing, this may cause unexpected issues (and it actually does cause issues in your case). Instead, copy the files with filezilla or winscp to a temporary file (let say /tmp), then ssh to your instance with putty and move the file to the rstudio directory with sudo (e.g sudo mv /tmp/myfile /home/rstudio).

ping in command prompt using computer name says "destination host unreachable" but it works properly when I use Ip Address to ping [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
just new to stackoverflow. I have an issue with regards to using "ping" command in my PC's command prompt. I am using windows 7 OS.
Whenever I issue a "ping VMSTBOX" command in my cmd it returns "destination host unreachable". VMSTBOX is my Computer Name. However when I use "ping 192.168.111.223" which is my IP address in in my Local Area Connection-->Properties-->TCP/IPv4 . it works just fine. They are basically just the same machine but why doesnt it work when i use my computer name?
I triple checked everything to make sure there are no typos in the inputs or names used but to no avail. I can't post a screenshot since I need 10 points to be able to post an image.
Any help or suggestions to fixing this would be a great help Thanks!
Click Start > All Programs > Accessories.
Right-click Notepad and select Run as administrator.
Click Continue on the Windows needs your permission UAC window.
When Notepad opens, click File > Open.
In the File name field, type C:\Windows\System32\Drivers\etc\hosts.
Click Open.
Add the Line 192.168.111.223 VMSTBOX
Click File > Save to save your changes.
The above steps should allows you to ping yourself using the name VMSTBOX with the ip address 192.168.11.223, change 192.168.111.223 to local ip 127.0.0.1 if you just want it to be able to ping yourself.

Telnet is not recognized as internal or external command, even after activation [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I am trying to perform port forwarding to connect two emulators using TCP protocol on Windows.
Although I have enabled TCP client program from control Panel, "telnet" command is not recognized in Command Prompt.
Could anyone help me to fix this?
You have to go to Control Panel>Programs>Turn Windows features on or off. Then, check "Telnet Client" and save the changes. You might have to wait about a few minutes before the change could take effect.
Open "Start" (Windows Button)
Search for "Turn Windows features On or Off"
Check "Telnet client" and check "Telnet server".
You can also try dism /online /Enable-Feature /FeatureName:TelnetClient
Run this command with "Run as an administrator"
Reference
You can try using Putty (freeware). It is mainly known as a SSH client, but you can use for Telnet login as well
If your Windows 7 machine is a member of an AD, or if you have UAC enabled, or if security policies are in effect, telnet more often than not must be run as an admin. The easiest way to do this is as follows
Create a shortcut that calls cmd.exe
Go to the shortcut's properties
Click on the Advanced button
Check the "Run as an administrator" checkbox
After these steps you're all set and telnet should work now.

How do I access data from my personal computer on my AMI instance running RStudio server [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have recently set up RStudio on an AMI ec2 instance using the process generously laid out by Louis Aslet from his website. But in an embarrassing turn of events I can't access the data I need because it resides on my personal computer. I am new to cloud computing and have 0 functional knowledge of Linux, but I do know SQL, and R well. Any help or suggestions would be greatly appreciated.
Have you tried the "Upload" button in the "Files" window of Rstudio?
use scp in terminal.
To put files from your remote server
Example: if the files are located locally in ~/mylocalfolder and you want to put them in /home/rstudio/mydata you would execute in terminal:
scp ~/mylocalfolder/*.csv ubuntu#<your address>:/home/rstudio/myData/
Note that if you want to access them under a different user, eg, rstudio, you need to change owners on the files. Use chown
To grab data from your remote server
Example: if the files are located on /home/rstudio/mydata and you want to put them locally in ~/mylocalfolder you would use
scp ubuntu#<your address>:/home/rstudio/myData*.Rda ~/mylocalfolder
I use the RStudio AMI all the time and what works for me is to use Dropbox. I can't remember exactly how I did it but I think I may have started the shell from within RStudio and installed Dropbox from the command line.
This link has a little more info:
http://www.louisaslett.com/RStudio_AMI/#comment-1041983219

Copying files between two Unix hosts [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am running a remote ssh server from my jailbroken iPod, and once connected I have root access to its file system, however when I try to copy files from the iPod to my computer, I realize I cannot access my computer's file system in that Unix user. I am a little new to this so forgive me if I am doing something dumb, but is there some way I can get these files onto my computer?
System info:
Computer: MacBook Pro 5,5 OS X 10.8.2
Ipod: iPod touch 2,2 iOS 4.1.2
You should be able to use scp. It works almost like copy, but uses ssh to copy between hosts.
From the desktop you would run something like
scp root#ipod:/my/file .
This would log in to iPod (you should replace that with the ip address or domain name you use to log in) as root user (you can replace that user with the one you use) and copy /my/file to the machine you're running the command from, in the current directory.

Resources