Failed to initialize compiler: object java.lang.Object in compiler mirror not found


Question On Ubuntu 16.04, I installed scala: $ls ~/Binary/scala-2.11.8 bin doc lib man $grep -A 2 SCALA ~/.bashrc SCALA=~/Binary/scala-2.11.8 SBT=~/Binary/sbt export PATH=$PATH:$SCALA/bin:$SBT/bin With openjdk8 installed, scala fails when opening the REPL: $javac -version javac 1.8.0_91 $ $scala Welcome to Scala 2.11.8 (OpenJDK 64-Bit Server VM, Java 9-internal). Type in expressions for evaluation. Or try :help. scala> Failed to initialize compiler: object java.lang.Object in compiler mirror not found. ** Note that as of 2.…
Read more ⟶

How to configure Jenkins to run on port 80


Question I'm running Ubuntu 11.10 and have run sudo apt-get install jenkins to install Jenkins on this system. I've seen some tutorials on how to setup a reverse proxy (Apache, Nginx, etc), however this is a VM dedicated for just jenkins and I'd like keep it as lean as possible while having jenkins running on port 80. I've found the upstart config in /etc/init/jenkins.conf and modified the port to 80 env HTTP_PORT=80…
Read more ⟶

How to insert BLOB and CLOB files in MySQL?


Question I want to store images and .docx/.doc, .pptx/.ppt, .pdf files using the front end of my software. I don't understand how to implement this and how to insert the BLOB and CLOB files into the table. Please help. I am using Kubuntu 11.04, MySQL5, Qt 4.7.3. Answer Two ways: 1 - Use a LOAD_FILE function - INSERT INTO table1 VALUES(1, LOAD_FILE('data.png')); 2 - Insert file as hex string, e.g. -…
Read more ⟶

How I can load a font file with PIL.ImageFont.truetype without specifying the absolute path?


Question When I write the code in Windows, this code can load the font file just fine: ImageFont.truetype(filename='msyhbd.ttf', size=30); I guess the font location is registered in Windows registry. But when I move the code to Ubuntu, and copy the font file over to /usr/share/fonts/, the code cannot locate the font: self.font = core.getfont(font, size, index, encoding) IOError: cannot open resource How can I get PIL to find the ttf file without specifying the absolute path?…
Read more ⟶

Empty function in BASH


Question I'm using FPM tool to create .deb package. This tool create before/after remove package from supported files. Unfortunatly the bash script generated by FPM contains such function dummy() { } And this script exit with an error: Syntax error: "}" unexpected Does BASH doesn't allow empty functions? Which version of bash/linux have this limitation? Answer You could use : that is equivalent to true and is mostly used as do nothing operator.…
Read more ⟶

Can not increase max_open_files for Mysql max-connections in Ubuntu 15


Question I am running this version of Mysql Ver 14.14 Distrib 5.6.24, for debian-linux-gnu (x86_64) On this version of Ubuntu Distributor ID: Ubuntu Description: Ubuntu 15.04 Release: 15.04 Codename: vivid This is the config I set for Mysql: key_buffer_size = 16M max_allowed_packet = 16M thread_stack = 192K thread_cache_size = 8 innodb_buffer_pool_size=20G innodb_log_buffer_size=16M tmp_table_size = 32M max_heap_table_size = 32M open-files-limit=4510 max_connections=500 myisam-recover = BACKUP query_cache_type=1 query_cache_limit = 32M query_cache_size = 32M These are the warnings I keep getting when starting MYSQL:…
Read more ⟶

How to make "godoc" command work on my system?


Question "godoc" doesnt' work on my system.(I'm using ubuntu 13.04) godoc fmt gives the following error 2013/06/08 19:12:43 readTemplate: open /usr/lib/go/lib/godoc/codewalk.html: no such file or directory "which go" gives: /usr/bin/go "go env" gives the following: GOROOT="/usr/lib/go" GOBIN="" GOARCH="386" GOCHAR="8" GOOS="linux" GOEXE="" GOHOSTARCH="386" GOHOSTOS="linux" GOTOOLDIR="/usr/lib/go/pkg/tool/linux_386" GOGCCFLAGS="-g -O2 -fPIC -m32 -pthread" CGO_ENABLED="1" What should I do to make it work? Answer Install godoc by using go install go install -v golang.org/x/tools/cmd/godoc@latest …
Read more ⟶