quinta-feira, 2 de agosto de 2018

"Failed to fetch http://dl.google.com/linux/earth/deb/dists/stable/Release"


I have received this warning every time I upgrade my Linux Mint Debian Editian 2 (LMDE 2). Today I decided to solve this problem. After some research I found a possible solution. I'm still testing, but I'll share it this way to fix the problem:

First step, execute this command:
$ sudo sed -i -e 's/deb http/deb [arch=amd64] http/' "/etc/apt/sources.list.d/google-earth-pro.list"

So, execute this one:
$ sudo sed -i -e 's/deb http/deb [arch=amd64] http/' "/etc/cron.daily/google-earth-pro"

And then:
$ sudo apt-get update ; sudo apt-get check

As I commented, I'm still testing if this configuration will be reset, but with this I can upgrade the sources. In case I have news I will tell you.

Tks!

sábado, 21 de julho de 2018

Access to Bitbucket stopped to work via http and git


Yesterday I changed my Vivo Fibra plan to 100 Mb, so the company had to change the router. Everything was working fine until I needed to do a git pull, from my bitbucket repository. After tireless searches I found the solution. I still don't know if it has other solution, but this one worked to me. 

I just put it in the file /etc/hosts the line:

104.192.143.2 bitbucket.org

Now, try again to git pull or access bitbucket.org via browser. 

I hope this tip has helped you.

;)

quinta-feira, 5 de abril de 2018

Infinite loop in npm install


To solve this error, run:

$ sudo npm -g --unsafe-perm install node-sass

Laravel - error on migrate


PHP 5.6
Mysql 5.5
Laravel 5.4


I had this error while executing: php artisan migrate

Syntax error or access violation: 1071 Specified key was too long; max key l ength is 767 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`))


I solved by changing the file config/database.php:

'charset' => 'utf8mb4' by 'charset' => 'utf8'
'collation' => 'utf8mb4_unicode_ci' by 'collation' => 'utf8_unicode_ci'

Drop the created tables by laravel, and execute php artisan migrate again.

quarta-feira, 11 de outubro de 2017

Mysql: errno 12

Message error: InnoDB: mmap(xxx bytes) failed; errno 12


To resolve the Mysql error 12, follow this steps:

$ sudo dd if=/dev/zero of=/swapfile bs=1M count=1024
$ sudo mkswap /swapfile 
$ sudo swapon /swapfile

Add this line to /etc/fstab
/swapfile swap swap defaults 0 0

This last step is needed if you would like to automatically enable swap file after each reboot.