Some Problems with Linux(Ubuntu) and Solutions - IIT Blog

Saturday, July 15, 2017

Some Problems with Linux(Ubuntu) and Solutions



Some common problems & solutions in Ubuntu (Linux):


=>>After installation problem arises with [[ sudo apt-get update && sudo apt-get upgrade ]] which is similar to this:



//
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)E: Unable to lock directory /var/lib/apt/lists/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?
//

Solution:

sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock




>>Installing NVIDIA DRIVERS[gtx all series[tested on gtx 950, 960,970,980,1060,1080,760,750ti]:


<run command:(Ctrl+Alt+T)>

sudo apt-get purge nvidia*
sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update sudo apt-get install nvidia-370 

>>You might be problem with increasing Fan speed:(Program name NVIDIA X server Settings)

//now run these commands:


sudo nvidia-xconfig sudo nvidia-xconfig --cool-bits=4sudo  gedit /etc/X11/xorg.conf


<type these lines there(gedit->xorg.conf)>

  Section "Device"
  Identifier "Device0"
  Driver "nvidia"
  VendorName "NVIDIA Corporation"
  BoardName "GeForce GTX 570"
  Option "NoLogo" "True"
  Option "Coolbits" "4"

  EndSection



XXX--Your Graphics Borad name.

=>>Sensors Installing: 


sudo apt install lm-sensors

=> now in command terminal hit command => sensors


=>>Install UNITY TWEAK TOOL to change layout>


   [in ubuntu software centre just serach and then install]

=>>Advanced boot customizer by Grub Customizer>


To install Grub customizer run these commands:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer

sudo apt-get updatesudo apt-get install grub-customizer


>>JAVA INSTALLING:(To check java installed or not just hit command => javac)
   (If no command found then you have to install it)
   (If no command found then you have to install it)

>>In command window:

sudo add-apt-repository ppa:webupd8team/java
sudo apt updatesudo apt install oracle-java8-installer
sudo apt install oracle-java8-set-default

<now enviroment variable setting..Without this setting you can't work with
any java based software>

sudo gedit /etc/profile


(In the gedit window paste these line in last::remined>java-8-oracle is your java folder.. It is not always same.. Here I installed java-8 version)

export JAVA_HOME=/usr/lib/jvm/java-8-oracle 
export PATH=${PATH}:${JAVA_HOME}/bin


>>Now you are about all set....


=>> Disk Opening Problem:"ERROR MOUNTING" 



"<Error mounting /dev/sda2 at /media/deb/Essentials: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000" "/dev/sda2" "/media/deb/Essentials"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 0).Metadata kept in Windows cache, refused to mount.Failed to mount '/dev/sda2': Operation not permittedThe NTFS partition is in an unsafe state. Please resume and shutdownWindows fully (no hibernation or fast restarting), or mount the volumeread-only with the 'ro' mount option.>"

>>"In command window just type:"


=> sudo ntfsfix /dev/sdXY ;

[XY is your=>partition number..example:sdc1,sdb2 etc.... ]



=>>NETBEANS INSTALL


$chmod 755 netbeans-8.0.2-php-linux.sh
$sudo ./netbeans-*

>>At the time of installation you might have to set the "jdk"

To set that >> select>>>usr>>lib>>jvm>>java-8-oracle [>>Java-8-Oracle for Java 8 version, It is different about versions]

>> After Installation select >>Try a project>>JavaFX>> Run a project to check installation....



>>Installing <Google chrome> 


wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update sudo apt-get install google-chrome-stable

>>[Now You have installed Google chrome]


>>Install <QBITTORRENT>


sudo add-apt-repository ppa:qbittorrent-team/qbittorrent-stable
sudo apt update 
sudo apt install qbittorrent-nox

=>>Kali linux tool <katoolin> installation::


sudo chmod +x /usr/bin/katoolin 
sudo katoolin


>>Installing Xampp:  <xampp installing>



wget https://www.apachefriends.org/xampp-files/5.6.20/xampp-linux-x64-5.6.20-0-installer.run
sudo su
chmod +x xampp-linux-x64-5.6.20-0-installer.run
./xampp-linux-x64-5.6.20-0-installer.run

>>then:


sudo gedit /usr/share/applications/xampp-control-panel.desktop

[reminder:>>without editing that you can't run server ..So Paste that lines and save ]

      [Desktop Entry]
      Encoding=UTF-8
      Name=XAMPP Control Panel
      Comment=Start and Stop XAMPP
      Exec=gksudo /opt/lampp/manager-linux-x64.run
      Icon=/opt/lampp/htdocs/favicon.ico
      Categories=Application
      Type=Application
      Terminal=false


>>Run following commands in terminal...


sudo apt-get update

>>Now you're all about setup............


=>>Folder color change:

sudo add-apt-repository ppa:costales/folder-color
sudo apt-get update 
sudo apt-get install folder-colornautilus -q
[Right click on your mouse ,on a folder ,then select option folder change. Then select you color]


=>>Problem :::Software index is broken
            Cannot add or remove packages


It is impossible to install or remove any software. Please use the package manager
"Synaptic" or run "sudo apt-get install -f" in a terminal to fix this issue at first.



>>>Solution:


Never mind. I figured out how to fix it myself. For anyone else who gets this problem, here is what you need to do:

 >>>  Type in a command window:
           sudo dpkg --configure -a


            It will error out, but don't worry. Find the files causing the problems and

>>>> Type
        sudo dpkg -r PACKAGE_NAME_FOR_WHICH_ERROR_OCCUR 

for each one to remove it. Some of them will fail to be removed. Add them to a list.

>>>> Run
        sudo dpkg --configure PACKAGE_NAME 

for each package in your list. It will configure them. This time, you should not see any errors.
>>>> Run

       sudo apt-get install -f
 Your dependency problems have solved now.

##JOB DONE NO PROBLEM NOW to INSTALL packages.











No comments:

Post a Comment