Cannot delete device /dev/loop0
Question I unsafely removed a USB device that was attached to loop0 with losetup and could not delete nor detach loop0 afterwards.
losetup -a shows /dev/loop0: [0005]:145606719 (/dev/sdb1)
When I remount the device to /dev/sdb1, umount it and try losetup -d /dev/loop0, I will still get the same error loop: can't delete device /dev/loop0: Device or resource busy. Is there a way to get rid of the loop device?
Answer You may have to also use dmsetup to remove the device mapping.…
Read more ⟶Upgraded to Ubuntu 16.04 now MySQL-python dependencies are broken
Question I just upgraded my Ubuntu install to 16.04 and this seems to have broken my mysql dependencies in the MySQL-python package.
Here is my error message:
File "/opt/monitorenv/local/lib/python2.7/site-packages/sqlalchemy/engine/__init__.py", line 386, in create_engine
return strategy.create(*args, **kwargs)
File "/opt/monitorenv/local/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 75, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File "/opt/monitorenv/local/lib/python2.7/site-packages/sqlalchemy/dialects/mysql/mysqldb.py", line 92, in dbapi
return __import__('MySQLdb')
File "/opt/monitorenv/local/lib/python2.7/site-packages/MySQLdb/__init__.py", line 19, in <module>
import _mysql
ImportError: libmysqlclient.so.18: cannot open shared object file: No such file or directory
So basically the import_mysql is looking for an so file that doesn't exist because in Ubuntu 16.…
Read more ⟶Unable to update Git on Ubuntu
Question I am trying to set up Git on an Ubuntu Machine (I'm using a Samsung Chromebook running Ubuntu 12.04). When I entered "sudo apt-get install git" and it successfully installed Git 1.79
user@ChrUbuntu:~$ git --version
git version 1.7.9.5
I can't figure out what I am doing wrong here. Any suggestions?
Answer For new installations of Ubuntu I would first try this to get the latest updates
sudo apt-get dist-upgrade
For more info on this see https://askubuntu.…
Read more ⟶Pub command is not found after installing dart-sdk
Question I want to write a command line application on my Ubuntu machine but I encountered a problem when I was installing the dart sdk of dart 2 on linux mint 19.
After the installation I can't run the pub command from the terminal.
I always get this error:
Command 'pub' not found, did you mean:
command ‘puf’ from deb puf command ‘pdb’ from deb python command ‘publ’ from deb atfs command ‘pua’ from deb pglistener command ‘dub’ from deb dub command ‘pcb’ from deb pcb-gtk command ‘pcb’ from deb pcb-lesstif command ‘pudb’ from deb python-pudb…
Read more ⟶Verify the version of ubuntu running in a Docker container
Question I have Docker Toolbox installed on windows 8.1 and I am creating an image based on ubuntu:latest (which should be 16.04). I want to make sure that my application is indeed run on 16.04. Here is my Dockerfile:
FROM ubuntu:latest
MAINTAINER xyz xyz@abc.com
COPY apt.conf /etc/apt/
RUN apt-get -y update RUN apt-get -y install cmake
RUN mkdir /usr/local/
COPY folder /usr/local/
RUN mkdir /usr/local/build
CMD cd /usr/local/build
CMD cmake /usr/local/
Once the image is built, i try to run :…
Read more ⟶How to install Robomongo from tar.gz file as a program in Ubuntu 15.10
Question Nowadays robomongo developers releasing the new versions of robomongo as tar.gz not in .deb packages that was easy for double click installations. But that option is no longer available. So how to install it as a program in Ubuntu. I have tried extracting the package and install but failed.
admin@admin-lenovo:~$ cd Downloads/
admin@admin-lenovo:~/Downloads$ tar -xzf robomongo-0.9.0-rc4-linux-x86_64-8c830b6.tar.gz admin@admin-lenovo:~/Downloads$ cd robomongo-0.9.0-rc4-linux-x86_64-8c830b6/
admin@admin-lenovo:~/Downloads/robomongo-0.9.0-rc4-linux-x86_64-8c830b6$ ./configure
bash: ./configure: No such file or directory
Also .…
Read more ⟶PgAdmin: Package 'pgAdmin4' has no installation candidate
Question I just installed PostgreSQL and I am trying to install pgdmin4, but whenever I run the command below to install pgadmin4 and pgadmin4-apache2
sudo apt install pgadmin4 pgadmin4-apache2
I often get the error
E: Package 'pgadmin4' has no installation candidate
E: Unable to locate package pgadmin4-apache2
I have tried out a lot of solutions, but none seems to do the trick. I need some help.
Answer Here's how I solved the issue;…
Read more ⟶