lost and found ( for me ? )

Showing posts with label apt-get. Show all posts
Showing posts with label apt-get. Show all posts

Ubuntu13.10: install Oracle Java with ppa

Here is how to install Oracle Java by using ppa repository.
root@note:~# tail -1 /etc/lsb-release ;uname -ri
DISTRIB_DESCRIPTION="Ubuntu 13.10"
3.11.0-13-generic x86_64

add the repo and install oracle java.
 175  add-apt-repository ppa:webupd8team/java
 176  apt-get update
 177  apt-get install oracle-java7-installer

root@note:~# which java
/usr/bin/java
root@note:~# java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

done!

Ubuntu 13.04 apt-get error : Too many levels of symbolic links



# tail -1 /etc/lsb-release ;uname -ri
DISTRIB_DESCRIPTION="Ubuntu 13.04"
3.8.0-33-generic x86_64

When issuing apt-get upgrade, I saw the following errors.
I am not sure what is the trigger on this issue, because other Ubuntu13.04 boxes can do apt-get upgrade without problems.
# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up firefox (25.0.1+build1-0ubuntu0.13.04.1) ...
update-alternatives: error: cannot stat file '/usr/lib/nx/nxserver': Too many levels of symbolic links
dpkg: error processing firefox (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
firefox
E: Sub-process /usr/bin/dpkg returned an error code (1)

/usr/lib/nx/nxserver is NoMachine FreeNX which is similar to VNC, Remote Desktop.

# ls -l /usr/lib/nx
total 20
lrwxrwxrwx 1 root root    17 Nov  5 09:44 nxserver -> /usr/bin/nxserver
-rwxr-xr-x 1 root root 19441 Aug 12 10:45 nxsetup

# file /usr/bin/nxserver
/usr/bin/nxserver: broken symbolic link to `/etc/alternatives/nxserver'

# file /etc/alternatives/nxserver
/etc/alternatives/nxserver: broken symbolic link to `/usr/lib/nx/nxserver'

/usr/lib/nx/nxserver -> /usr/bin/nxserver -> /etc/alternatives/nxserver -> /usr/lib/nx/nxserver..

round and round ..

how about remove this file?
# rm /etc/alternatives/nxserver
rm: remove symbolic link ‘/etc/alternatives/nxserver’? y

I was able to fix this, however I am not sure this way is appropriate or not.
# apt-get upgrade -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up firefox (25.0.1+build1-0ubuntu0.13.04.1) ...
Please restart all running instances of firefox, or you will experience problems.
# echo $?
0

small tips : Ubuntu : apt-get error : open (11: Resource temporarily unavailable)



# apt-get update
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/

Just remove /var/lib/apt/lists/lock file.
# rm /var/lib/apt/lists/lock
# rm: remove regular empty file `/var/lib/apt/lists/lock'? y

After removing the lock file , you will perform apt-get w/o the error.
# apt-get update
Ign http://jp.archive.ubuntu.com oneiric InRelease
Ign http://jp.archive.ubuntu.com oneiric-updates InRelease

In my case , this occurred after the network connectivity had been lost and I had aborted the apt-get command.

Ubuntu: How to upgrade kernel via apt-get

root@alaska:~# cat /etc/lsb-release | grep -i description
DISTRIB_DESCRIPTION="Ubuntu 10.04.1 LTS"

apt-get upgrade は kernel を upgrade しない。

1. 現在のカーネルのバージョンをチェック

root@alaska:~# uname -r
2.6.32-22-server

2. 最新バージョンをチェック

root@alaska:~# apt-cache search linux-image
linux-image-2.6.32-23-generic - Linux kernel image for version 2.6.32 on x86/x86_64
linux-image-2.6.32-23-preempt - Linux kernel image for version 2.6.32 on x86_64
linux-image-2.6.32-23-server - Linux kernel image for version 2.6.32 on x86_64
linux-image-2.6.32-23-virtual - Linux kernel image for version 2.6.32 on x86/x86_64
linux-image-2.6.32-24-generic - Linux kernel image for version 2.6.32 on x86/x86_64
linux-image-2.6.32-24-preempt - Linux kernel image for version 2.6.32 on x86_64
linux-image-2.6.32-24-server - Linux kernel image for version 2.6.32 on x86_64
linux-image-2.6.32-24-virtual - Linux kernel image for version 2.6.32 on x86/x86_64
...
linux-image-rt - Realtime (RT) Linux kernel image
root@alaska:~#

リアルタイム kernel イメージもあるんだー。

3. 最新バージョン ( 2.6.32-24 ) をインストール

root@alaska:~# apt-get install linux-image-2.6.32-24

4. リブート

root@alaska:~# init 6

再起動後。最新Ver. になった。

root@alaska:~# uname -r
2.6.32-24-server
 

Ubuntu : how to uninstall OpenOfiice

openoffice 必要ないので削除

root@alaska:~# apt-get -y remove openoffice*

注:

openoffice* ( not openoffice )
ワイルドカードをつける

yum groupremove みたいのがあればいいのに。