Archive

Author Archive

2015 in review

January 11, 2016 Leave a comment

The WordPress.com stats helper monkeys prepared a 2015 annual report for this blog.

Here’s an excerpt:

Madison Square Garden can seat 20,000 people for a concert. This blog was viewed about 66,000 times in 2015. If it were a concert at Madison Square Garden, it would take about 3 sold-out performances for that many people to see it.

Click here to see the complete report.

Categories: Uncategorized

Install Digikam 4.14 on Ubuntu 14.04

December 6, 2015 Leave a comment

Digikam 14.04

I love Digikam to manage my pictures. I want to install the latest stable release on Ubuntu 14.04.

Thanks to Philip Johnsson that maintains the ppa for Ubuntu:

https://launchpad.net/~philip5

First of all, add his ppa:

sudo add-apt-repository ppa:philip5/extra
sudo apt-get update

Now you can install digikam:

$ sudo apt-get install digikam
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 digikam : Depends: kdepim-runtime but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Trying to upgrade and reinstall digikam…

sudo apt-get upgrade
[...]
sudo apt-get install digikam

with no luck. apt-get is not able to resolve the unmet dependencies. In this situations, it’s better to use aptitude instead of apt-get:

$ sudo aptitude install digikam
The following NEW packages will be installed:
  akonadi-backend-mysql{a} akonadi-server{a} consolekit{a} digikam digikam-data{a} docbook-xml{a} docbook-xsl{a} enblend{a} enfuse{a} ffmpegthumbs{a} freeglut3{a} hugin{a} hugin-data{a} hugin-tools{a} 
  icoutils{a} kate-data{a} katepart{a} kde-runtime{a} kde-runtime-data{a} kdelibs-bin{a} kdelibs5-data{a} kdelibs5-plugins{a} kdepim-runtime{a} kdepimlibs-kio-plugins{a} kdoctools{a} kipi-plugins{a} 
  kipi-plugins-common{a} kubuntu-debug-installer{a} libaccounts-qt1{a} libakonadi-calendar4{a} libakonadi-contact4{a} libakonadi-kabc4{a} libakonadi-kcal4{a} libakonadi-kde4{a} libakonadi-kmime4{a} 
  libakonadi-notes4{a} libakonadi-socialutils4{a} libakonadiprotocolinternals1{a} libastro1{a} libattica0.4{a} libbaloocore4{a} libbaloofiles4{a} libbalooxapian4{a} libboost-filesystem1.54.0{a} 
  libboost-program-options1.54.0{a} libboost-regex1.54.0{a} libboost-signals1.54.0{a} libboost-thread1.54.0{a} libdbusmenu-qt2{a} libdlrestrictions1{a} libdmtx0a{a} libepub0{a} libexiv2-14{a} libglew1.10{a} 
  libgps20{a} libgsl0ldbl{a} libimage-exiftool-perl{a} libkabc4{a} libkactivities-bin{a} libkactivities-models1{a} libkactivities6{a} libkalarmcal2{a} libkatepartinterfaces4{a} libkcal4{a} libkcalcore4{a} 
  libkcalutils4{a} libkcmutils4{a} libkdcraw-data{a} libkdcraw23{a} libkde3support4{a} libkdeclarative5{a} libkdecore5{a} libkdesu5{a} libkdeui5{a} libkdewebkit5{a} libkdnssd4{a} libkemoticons4{a} 
  libkexiv2-11{a} libkexiv2-data{a} libkface-data{a} libkface3{a} libkfbapi1{a} libkfile4{a} libkgapi2-2{a} libkgeomap-data{a} libkgeomap2{a} libkholidays4{a} libkhtml5{a} libkidletime4{a} libkimap4{a} 
  libkio5{a} libkipi-data{a} libkipi11{a} libkjsapi4{a} libkjsembed4{a} libkldap4{a} libkmbox4{a} libkmediaplayer4{a} libkmime4{a} libknewstuff3-4{a} libknotifyconfig4{a} libkntlm4{a} libkolab0{a} 
  libkolabxml1{a} libkparts4{a} libkpimidentities4{a} libkpimtextedit4{a} libkpimutils4{a} libkpty4{a} libkqoauth0{a} libkresources4{a} libkrosscore4{a} libksane-data{a} libksane0{a} libktexteditor4{a} 
  libkubuntu0{a} libkvkontakte1{a} libkxmlrpcclient4{a} liblensfun-data{a} liblensfun0{a} libmailtransport4{a} libmarblewidget18{a} libmediawiki1{a} libmicroblog4{a} libnepomuk4{a} libnepomukcleaner4{a} 
  libnepomukcore4abi1{a} libnepomukquery4a{a} libnepomukutils4{a} libntrack-qt4-1{a} libntrack0{a} libopencv-photo2.4{a} libpam-ck-connector{a} libpano13-2{a} libpano13-bin{a} libpgf6{a} libphonon4{a} 
  libplasma3{a} libpolkit-qt-1-1{a} libpoppler-qt4-4{a} libprison0{a} libqapt2{a} libqapt2-runtime{a} libqca2{a} libqextserialport1{a} libqjson0{a} libqmobipocket1{a} libqrencode3{a} libqt4-designer{a} 
  libqt4-qt3support{a} libqt4-svg{a} libqtglib-2.0-0{a} libqtgstreamer-0.10-0{a} libqtgstreamerutils-0.10-0{a} libqtlocation1{a} libqtsolutions-soap-head1{a} libqtwebkit4{a} libquazip0{a} libraw10{a} 
  libshp1{a} libsignon-qt1{a} libsolid4{a} libsoprano4{a} libsqlite0{a} libstreamanalyzer0{a} libstreams0{a} libthreadweaver4{a} libvigraimpex5{a} libvirtodbc0{a} libwlocate0{a} libzthread-2.3-2{a} 
  marble-data{a} marble-plugins{a} mysql-client-core-5.5{a} mysql-server-core-5.5{a} nepomuk-core-data{a} nepomuk-core-runtime{a} ntrack-module-libnl-0{a} oxygen-icon-theme{a} phonon{a} 
  phonon-backend-gstreamer{a} phonon-backend-gstreamer-common{a} phonon-backend-gstreamer1.0{a} plasma-scriptengine-javascript{a} qapt-batch{a} sgml-data{a} shared-desktop-ontologies{a} soprano-daemon{a} 
  virtuoso-minimal{a} virtuoso-opensource-6.1-bin{a} virtuoso-opensource-6.1-common{a} 
0 packages upgraded, 191 newly installed, 0 to remove and 5 not upgraded.
Need to get 26.0 MB/157 MB of archives. After unpacking 516 MB will be used.
The following packages have unmet dependencies:
 mysql-server-core-5.6 : Breaks: mysql-server-core-5.5 but 5.5.46-0ubuntu0.14.04.2 is to be installed.
 mysql-client-core-5.6 : Breaks: mysql-client-core-5.5 but 5.5.46-0ubuntu0.14.04.2 is to be installed.
The following actions will resolve these dependencies:

     Remove the following packages:
1)     mysql-client-5.6            
2)     mysql-client-core-5.6       
3)     mysql-server-5.6            
4)     mysql-server-core-5.6       



Accept this solution? [Y/n/q/?] 
The following NEW packages will be installed:
  akonadi-backend-mysql{a} akonadi-server{a} consolekit{a} digikam digikam-data{a} docbook-xml{a} docbook-xsl{a} enblend{a} enfuse{a} ffmpegthumbs{a} freeglut3{a} hugin{a} hugin-data{a} hugin-tools{a} 
  icoutils{a} kate-data{a} katepart{a} kde-runtime{a} kde-runtime-data{a} kdelibs-bin{a} kdelibs5-data{a} kdelibs5-plugins{a} kdepim-runtime{a} kdepimlibs-kio-plugins{a} kdoctools{a} kipi-plugins{a} 
  kipi-plugins-common{a} kubuntu-debug-installer{a} libaccounts-qt1{a} libakonadi-calendar4{a} libakonadi-contact4{a} libakonadi-kabc4{a} libakonadi-kcal4{a} libakonadi-kde4{a} libakonadi-kmime4{a} 
  libakonadi-notes4{a} libakonadi-socialutils4{a} libakonadiprotocolinternals1{a} libastro1{a} libattica0.4{a} libbaloocore4{a} libbaloofiles4{a} libbalooxapian4{a} libboost-filesystem1.54.0{a} 
  libboost-program-options1.54.0{a} libboost-regex1.54.0{a} libboost-signals1.54.0{a} libboost-thread1.54.0{a} libdbusmenu-qt2{a} libdlrestrictions1{a} libdmtx0a{a} libepub0{a} libexiv2-14{a} libglew1.10{a} 
  libgps20{a} libgsl0ldbl{a} libimage-exiftool-perl{a} libkabc4{a} libkactivities-bin{a} libkactivities-models1{a} libkactivities6{a} libkalarmcal2{a} libkatepartinterfaces4{a} libkcal4{a} libkcalcore4{a} 
  libkcalutils4{a} libkcmutils4{a} libkdcraw-data{a} libkdcraw23{a} libkde3support4{a} libkdeclarative5{a} libkdecore5{a} libkdesu5{a} libkdeui5{a} libkdewebkit5{a} libkdnssd4{a} libkemoticons4{a} 
  libkexiv2-11{a} libkexiv2-data{a} libkface-data{a} libkface3{a} libkfbapi1{a} libkfile4{a} libkgapi2-2{a} libkgeomap-data{a} libkgeomap2{a} libkholidays4{a} libkhtml5{a} libkidletime4{a} libkimap4{a} 
  libkio5{a} libkipi-data{a} libkipi11{a} libkjsapi4{a} libkjsembed4{a} libkldap4{a} libkmbox4{a} libkmediaplayer4{a} libkmime4{a} libknewstuff3-4{a} libknotifyconfig4{a} libkntlm4{a} libkolab0{a} 
  libkolabxml1{a} libkparts4{a} libkpimidentities4{a} libkpimtextedit4{a} libkpimutils4{a} libkpty4{a} libkqoauth0{a} libkresources4{a} libkrosscore4{a} libksane-data{a} libksane0{a} libktexteditor4{a} 
  libkubuntu0{a} libkvkontakte1{a} libkxmlrpcclient4{a} liblensfun-data{a} liblensfun0{a} libmailtransport4{a} libmarblewidget18{a} libmediawiki1{a} libmicroblog4{a} libnepomuk4{a} libnepomukcleaner4{a} 
  libnepomukcore4abi1{a} libnepomukquery4a{a} libnepomukutils4{a} libntrack-qt4-1{a} libntrack0{a} libopencv-photo2.4{a} libpam-ck-connector{a} libpano13-2{a} libpano13-bin{a} libpgf6{a} libphonon4{a} 
  libplasma3{a} libpolkit-qt-1-1{a} libpoppler-qt4-4{a} libprison0{a} libqapt2{a} libqapt2-runtime{a} libqca2{a} libqextserialport1{a} libqjson0{a} libqmobipocket1{a} libqrencode3{a} libqt4-designer{a} 
  libqt4-qt3support{a} libqt4-svg{a} libqtglib-2.0-0{a} libqtgstreamer-0.10-0{a} libqtgstreamerutils-0.10-0{a} libqtlocation1{a} libqtsolutions-soap-head1{a} libqtwebkit4{a} libquazip0{a} libraw10{a} 
  libshp1{a} libsignon-qt1{a} libsolid4{a} libsoprano4{a} libsqlite0{a} libstreamanalyzer0{a} libstreams0{a} libthreadweaver4{a} libvigraimpex5{a} libvirtodbc0{a} libwlocate0{a} libzthread-2.3-2{a} 
  marble-data{a} marble-plugins{a} mysql-client-core-5.5{a} mysql-server-core-5.5{a} nepomuk-core-data{a} nepomuk-core-runtime{a} ntrack-module-libnl-0{a} oxygen-icon-theme{a} phonon{a} 
  phonon-backend-gstreamer{a} phonon-backend-gstreamer-common{a} phonon-backend-gstreamer1.0{a} plasma-scriptengine-javascript{a} qapt-batch{a} sgml-data{a} shared-desktop-ontologies{a} soprano-daemon{a} 
  virtuoso-minimal{a} virtuoso-opensource-6.1-bin{a} virtuoso-opensource-6.1-common{a} 
The following packages will be REMOVED:
  mysql-client-5.6{a} mysql-client-core-5.6{a} mysql-server-5.6{a} mysql-server-core-5.6{a} 
0 packages upgraded, 191 newly installed, 4 to remove and 5 not upgraded.
Need to get 26.0 MB/157 MB of archives. After unpacking 357 MB will be used.
Do you want to continue? [Y/n/?] 

And I finally got digikam 4.14 installed on my system.

Now, enjoy and leave any comments below.

Categories: digikam, linux, ubuntu Tags: ,

Apache file negotiation error: Negotiation: discovered file(s) matching request: /var/www/mysite/mypage (None could be negotiated).

December 4, 2015 Leave a comment

I rescued this post from my Drafts, I forgot to post it on time! Here is the original post.

Today I’ve been struggling with an annoying message in Apache’s error log:


[Wed Oct 02 19:18:36 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.4.9-4ubuntu2.3 configured -- resuming normal operations
[Wed Oct 02 19:18:43 2013] [error] [client 127.0.0.1] Negotiation: discovered file(s) matching request: /var/www/mysite/view (None could be negotiated).
[Wed Oct 02 19:18:43 2013] [error] [client 127.0.0.1] Negotiation: discovered file(s) matching request: /var/www/mysite/404 (None could be negotiated).

I have two Ubuntu boxes, one with Ubuntu 12.04 LTS 64 bits  and another with Ubuntu 13.04 64 bits recently installed. I usually export projects from one box to another, and when I imported the project to my Ubuntu 13.04 box I got this problem. The website works fine in my 12.04 machine, so, I pressumed it’s an Apache configuration issue between my two boxes.

I want to redirect http://www.mysite.local/home to http://www.mysite.local/view.php?page=home.

My .htaccess works right on the other machine, so I’ve checked for mod_rewrite status and it’s also enabled in the 13.04 box.

This is my VirtualHost :


<Directory /var/www/myotragus.net>
 Options Indexes FollowSymLinks MultiViews
 AllowOverride All
 Order allow,deny
 allow from all
 </Directory>

I adjusted the RewriteLogLevel to 9 but I can’t understand the final redirection from view to -> view:


127.0.0.1 - - [02/Oct/2013:19:00:54 +0200] [www.mysite.local/sid#7f10f7002670][rid#7f10f143c880/initial/redir#3] (2) [perdir /var/www/mysite/] rewrite 'view' -> 'view?page=view'

After googling a while, I tried different things, but none worked:

  • Disabling Multiviews in my VirtualHost did’nt worked
  • Disabling mod_negotiation neither worked for me.

Finally, I found this post at serverfault.com that hit the nail on the head: I have to edit the /etc/apache2/mods-available/mime.conf to add this line:

AddType application/x-httpd-php .php

As Lorenzo said in his answer, the negotiation was failing because mod_negotiation only looks for known file types.

Just restarted apache and all worked again as intended.

Please, leave your comments below.

Categories: apache, linux, php, ubuntu Tags: ,

Use different color for root terminal on Linux

December 4, 2015 Leave a comment

Looking for a way to distinguish the different terminals i usually have opened, I found this post:

http://lifehacker.com/5195951/use-a-different-color-for-the-root-shell-prompt

It just changes the prompt color, red if you’re root, adding this line at the end of /root/.bashrc:

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

and green for normal users, adding this to your ~/.bashrc

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

and restarting the terminals.

Now it’s easier to know if you’re root or not!

Please, feel free to leave your comments

Categories: linux, ubuntu Tags: ,

MySQL: Error 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO) [REVISITED]

November 7, 2015 Leave a comment

Have you ever read my 2011 post about this error? Check this before:

https://myotragusbalearicus.wordpress.com/2011/11/21/mysql-error-1045-28000-access-denied-for-user-rootlocalhost-using-password-no/

After that, if you’re still getting the same error, simply try this:

$ mysql -u root -p

You’ll be prompted for root password. Type it and you’re connected to the database.

Please, share your comments below.

Categories: MySQL Tags: , , ,

Error altering tempfile: ORA-00376: file 202 cannot be read at this time

I noticed a lot of ORA-01652 errors while gathering some table statistics (Oracle 10g Release 2 – 10.2.0.4):


BEGIN DBMS_STATS.GATHER_TABLE_STATS('OWNER','TABLE', cascade=&gt;true, estimate_percent=&gt;60); END;

*
ERROR at line 1:
ORA-01652:&nbsp;Unable to extend temp segment by 256 in tablespace TEMP

ORA-06512: at "SYS.DBMS_STATS", line 13437
ORA-06512: at "SYS.DBMS_STATS", line 13457
ORA-06512: at line 1

When I’m trying to resize the tempfile I get an ORA-00376 error:


SQL&gt; alter database tempfile '/app/oracle/oradata/temp01.dbf' resize 20G;
alter database tempfile '/app/oracle/oradata/temp01.dbf' resize 20G
*
ERROR at line 1:
ORA-00376: file 202 cannot be read at this time
ORA-01110: datafile 202: '/app/oracle/oradata/temp01.dbf'

I checked the file on the filesystem and it exists and has the correct permissions:

$ ls -lrth /app/oracle/oradata/temp01.dbf
-rw-r----- 1 oracle dba 15G 17 nov 02:01 /app/oracle/oradata/temp01.dbf

After bouncing the database, I try to alter again the tempfile and now I get an ORA-01516:

SQL&gt; alter database tempfile '/app/oracle/oradata/temp01.dbf' resize 20G;
alter database tempfile '/app/oracle/oradata/temp01.dbf' resize 20G
*
ERROR at line 1:
ORA-01516: nonexistent log file, datafile, or tempfile '/app/oracle/oradata/temp01.dbf'

But the file is there as I checked before. With this new ORA-01516 error I checked the status of the tempfile and the error was there:


SQL&gt; select tablespace_name , status from dba_tablespaces where tablespace_name = 'TEMP';

TABLESPACE_NAME STATUS
------------------------------ ---------
TEMP ONLINE

SQL&gt; select name ,status from v$tempfile where name like '%temp%';

NAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;STATUS
----------------------------------------------------------------------
/app/oracle/oradata/temp01.dbf &nbsp; &nbsp; &nbsp; &nbsp;        OFFLINE

The tempfile is offline. This is because our server ran out of space this morning, as you can see in the alert log:

Errors in file /app/oracle/admin/db1/udump/db11_ora_18815.trc:
ORA-01114:IO error writing block to file 202 (block # 1218066)
ORA-27072: I/O error
Linux-x86_64 Error: 28: No space left on device
Additional information: 4
Additional information: 1218066
Additional information: -1

After freeing disk space, I try to bring back the datafile online:


SQL&gt; alter database datafile '/app/oracle/oradata/temp01.dbf' online;
 alter database datafile '/app/oracle/oradata/temp01.dbf' online
 *
 ERROR at line 1:
 ORA-01516:&nbsp;nonexistent log file, datafile or tempfile&nbsp;'/app/oracle/oradata/temp01.dbf'

I neither can take the TEMP tablespace offline:


SQL&gt; alter tablespace temp offline;
 alter tablespace temp offline
 *
ERROR at line 1:
ORA-03217: invalid option for alter of TEMPORARY TABLESPACE

The solution is to recreate the tempfile:

  • First, delete the existing tempfile from the database
  • Remove the file from the filesystem (rm)
  • Create a new tempfile.
SQL&gt; alter database tempfile '/app/oracle/oradata/temp01.dbf' drop;

Database modified.

SQL&gt; !ls -lrt /app/oracle/oradata/temp01.dbf

-rw-r----- 1 oracle dba 15728644096 17 nov 02:01 /app/oracle/oradata/temp01.dbf

SQL&gt; !rm /app/oracle/oradata/temp01.dbf

SQL&gt; alter tablespace temp add tempfile '/app/oracle/oradata/temp01.dbf' size 15000M;

Tablespace modified.

SQL&gt; select name, status from v$tempfile;

NAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; STATUS
----------------------------------------&nbsp;-------
/app/oracle/oradata/temp01.dbf &nbsp; &nbsp; &nbsp;&nbsp;    ONLINE
&lt;pre&gt;

Now the tablespace is online and everithing returns to normal.

Any questions? Please feel free to comment below.

Categories: 10gR2, oracle Tags: ,

2014 in review

January 22, 2015 Leave a comment

The WordPress.com stats helper monkeys prepared a 2014 annual report for this blog.

Here’s an excerpt:

The Louvre Museum has 8.5 million visitors per year. This blog was viewed about 85,000 times in 2014. If it were an exhibit at the Louvre Museum, it would take about 4 days for that many people to see it.

Click here to see the complete report.

Categories: Uncategorized
Follow

Get every new post delivered to your Inbox.

Join 36 other followers