Ben Chuanlong Du's Blog

It is never too late to learn.

Fix Package Installation Issue in Linux

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Error message: The package hl1440lpr needs to be reinstalled, but I can't find an archive for it.

Steps to fix the issue:

Start with

sudo dpkg --remove --force-all hl1440lpr

If that …

Turn on Remote Login in Mac

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

You cannot SSH into a Mac (even if openssh is install on it) unless Remote Login is turned on. You can follow the steps below to turn on Remote Login on …

Install GNU Utils Using MacPorts

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Configuration

Run the following command after installation.

export PATH=/opt/local/libexec/gnubin/opt/local/bin:/opt/local/sbin:$PATH
export MANPATH=/opt/local/share/man:$MANPATH

Installation

sudo port install …

Mount Samba on Mac

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

GUI

Go -> Connect to Server

smb://path_to_dir

Command Line

mount -t smbfs //user@server/sharename share

mount_smbfs //user@SERVER/folder ./mntpoint

Install sbt on CentOS

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

wget http://dl.bintray.com/sbt/rpm/sbt-0.13.5.rpm
sudo yum install sbt-0.13.5.rpm
curl https://bintray.com/sbt/rpm/rpm | sudo tee /etc/yum.repos.d …

Change File Permission on Linux

R: 4 W: 2 X: 1

Make a directory readable to other people.

chmod 755 dir  

Make a file readable to other people.

chmod 644 file 

Make a directory and all its subcontents readable to other people.

# make the dir and its subcontents readable and executable
chmod 755 -R dir …