How do I run GNU Typist/gtypist on a Mac? - gnu

I'm a little familiar with command line but I'm still having problems running GNU Typist/gtypist. http://www.gnu.org/software/gtypist/
Can anyone give me really basic step-by-step instructions for a Mac?

Install using Homebrew
brew install gnu-typist
gtypist

You can also install it directly from the sources (note that for building from the sources you have to install XCode - it's free and you can download it from App Store):
Get the source of gnu typist
http://ftp.gnu.org/gnu/gtypist/gtypist-2.9.tar.gz
Get the source of ncurses
I am downloading it from GNU pages here:
ftp://ftp.gnu.org/gnu/ncurses//ncurses-6.0.tar.gz.sig
But you can get most recent version directly from maintainer's page:
ftp://ftp.invisible-island.net/ncurses/ncurses.tar.gz
Create place where you want to have all the stuff
mkdir ~/opt/usr
Build ncurses - pay attention to --enable-widec
./configure --enable-widec --with-shared --prefix=$HOME/opt/usr/
make; make install
Build gnutypist
export LDFLAGS="-L$HOME/opt/usr/lib"
export CFLAGS="-I$HOME/opt/usr/include"
./configure --prefix=$HOME/opt/usr/
make; make install
Run gnutypist
cd $HOME/opt/usr/bin
./gtypist

Alternatively to brew you can use MacPorts (macos package manager)
Installation command:
sudo port install gtypist
Link to the port summary page:
https://ports.macports.org/port/gtypist/summary

Related

How to install older gcc package using APT from a repository?

I have GCC v9. But I'm trying to install a GCC 4.8.1 version to test a library compilation on that very old version of GCC.
The version is not available in the official Ubuntu repos,it is deprecated, but I've found it in other mirrors as told by the official GCC website. This one seems like popular one:
https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
I have very little knowledge of linux package systems except for the basic. I want to keep both versions. So I should do this:
sudo apt -y install gcc-4.8.1 gcc-9
The reason why I want to use this command and not install it from the file, apart from the difficulty of doing that for me, is that I'm following a guide in order to have several GCCs on my system:
https://www.fosslinux.com/39386/how-to-install-multiple-versions-of-gcc-and-g-on-ubuntu-20-04.htm
When I add the url to the sources.list file seems like it is working.
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update -q
But when I try to call the install with gcc-4.8.1 or gcc-4.8 , or even gcc-4 the package doesn't exist.
Package gcc-4.8 is not available, but is referred to by another
package. This may mean that the package is missing, has been
obsoleted, or is only available from another source E: Package
'gcc-4.8' has no installation candidate
Also, I don't know if websites like these can be added to the repos list in order to find the package using APT:
http://www.netgull.com/gcc/releases/gcc-4.8.1/
[EDIT]
I downloaded the package from the website I linked. I have no idea how to install this by hand. If only I could find a repository that could help me with this... I have no idea how to make APT help me with the installation.
But I'm trying to install a GCC 4.8.1 version to test a library compilation on that very old version of GCC.
Developers have tools up their sleeve so they don't have to install dependencies and bloating their systems for every library (and every configuration of that library!) they want to try out and test.
Use docker. You could write for example a testing script, assuming your project uses make:
# test_my_lib_in_gcc-4.8.sh
#!/bin/sh
docker run -ti --rm -v $PWD:/project -w /project gcc:4.8 -u $UID:$GID sh <<EOF
make && make test
EOF
that will compile and test your application in using 4.8 gcc. Consider how easy it is to change gcc version - just change the number. You could test your library in gcc, in different versions, and using other compilers and on different distributions to make sure it works for others. If you're a developer of the library, write an automatized CI pipeline that would automatically test your application each commit in specific docker environment, using ex. https://docs.gitlab.com/ee/ci/README.html or https://travis-ci.org/ .

Is there a way to update visual-studio-code-bin which is installed from the arch wiki

visual-studio-code-bin is installed from the arch wiki. The only way I know how to actually update the software is reinstalling it again from the arch wiki which is tedious and inconvenient.
Any help is appreciated
Old post with a lot of split information so for anyone who finds this later, you have 2 choices:
Install the open source version of visual studio code from the official repos.
Install the official Microsoft binary version via the AUR that contains some proprietary code from Microsoft that is not available in the fully open version (e.g. some debugging some languages).
Info on how to do this can be found in the wiki.
It depends on how you installed vscode. If you did sudo pacman -S code, then the solution is to run it again. But if you did yay -S visual-studio-code-bin, then you should run THIS command again.
The best way to use VS Code on Arch is to use the open source version on the community repos. Which you can install by doing
sudo pacman -S code
visual-studio-code-bin is the proprietary binary which can be installed from the Arch User Repository.
If for some reason you want to go for the latter approach, you can either use an AUR helper or manage everything manually.
You can see the Arch Wiki's page on AUR helpers which shows the different options you have: https://wiki.archlinux.org/index.php/AUR_helpers
You can use these helpers to help manage your updates just like you would on pacman.
Here's how you would do things manually: https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_and_upgrading_packages
Just as a warning, AUR helpers are not supported by Arch Linux and the manual approach, though less user friendly is the recommended way by the Arch Wiki to manage your AUR Packages.
First a short version:
Simply run
sudo pacman -Sy
sudo pacman -S visual-studio-code-bin
The longer explanation:
Getting the right version of vscode
First of all, "code" and "visual-studio-code-bin" are two different packages. "code" is an open-source release and "visual-studio-code-bin" is an Microsoft-branded release. One of the major differences is that "code" doesn't support any Microsoft Extensions like C/C++, to my knowledge. This information can be found in the arch wiki: https://wiki.archlinux.org/title/Visual_Studio_Code#Installation. For more detailed information about the differences I'll refer you to the vscode repository: https://github.com/microsoft/vscode/wiki/Differences-between-the-repository-and-Visual-Studio-Code
By running "sudo pacman -S code" you (unintentionally) uninstall "visual-studio-code-bin" and install "code" because of wired some decency conflict.
So if you want to update/install "visual-studio-code-bin" run:
sudo pacman -S visual-studio-code-bin
This should fix any Problems with no functioning Microsoft-Extensions
Of course if you want to sick to the open-source version you can use
sudo pacman -S code
Fixing your Problem with not updating to the right version
I have to admit this took me ages. I had two machines, one with an freshly installed version of geruda Linux (an arch based distro) and an six moth old version of geruda Linux. Both had vscode installed. At the time of writing this the current version of vscode is 1.59.0-1. Interestingly the my old machine, witch had vscode version 1.58.0-1 installed didn't know that there was an newer version. The newer machine was aware of the the newer version. An simply running pacman -S visual-studio-code-bin didn't change anything. This hinted my to the problem of an not synchronized package database. And forcefully synchronizing the database with
sudo pacman -Sy
did the trick for me. For a more detialed information I would redirect you to the man pages: https://archlinux.org/pacman/pacman.8.html or this thread https://bbs.archlinux.org/viewtopic.php?id=117765. After running this command you only need to install vscode with "sudo pacman -S visual-studio-code-bin" or "sudo pacman -S code" to get the newest version of vscode
As rightly said by #AlexanderHD27 code is open source and vscode is microsoft official version but it is not open source. though code is more like an experimental version of of vscode; however, you can install code directly in archlinux using sudo pacman -S code but for the the vscode you have to clone the repository from github and install in the following way:
git clone visual-studio-code-bin
then cd visual-studio-code-bin and makepkg -si
remember if you don't have git installed you can do that using sudo pacman -S git. As for the update; code is updated during system full update but vscode is not updated. So, you have to cd into the directory again and do git pull the makepkg -si again.
As KamilCuk and Aviad mentioned there is no visual-studio-bin package, since it is a aur package you can use yay (AUR helper) to get a updateable version. For more information about yay see: https://github.com/Jguer/yay.
Install yay
sudo pacman -S --needed base-devel git
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cd ..
rm -rf yay
Install visual-studio-code-bin with yay
# install
yay -S visual-studio-code-bin
If you installed vscode via pamac manager in manjaro, try this:
pamac update
To update with the cloned AUR directory.
First update pacman database:
pacman-Sy
Then in the AUR directory you can update the AUR to the latest version with:
git pull
Then update dependencies with:
makepkg -s
Finally you install it:
makepkg -i
==> WARNING: A package has already been built, installing existing package...
==> Installing package visual-studio-code-bin with pacman -U...
loading packages...
resolving dependencies...
looking for conflicting packages...
Packages (1) visual-studio-code-bin-1.73.1-1
Total Installed Size: 324.26 MiB
Net Upgrade Size: 29.66 MiB
:: Proceed with installation? [Y/n]

libmnl Issue while installing libnetfilter queue in linux

I am trying to install libnetfilter_queue on Suse Linux. But after the
./configure step it shows
error: Package requirements (libmnl >= 1.0.3) were not met
No package 'libmnl' found
I am new to Linux and all the solutions which are available on the web, I don't know how to use them.
How can I fix this problem?
It is a common problem to the people working in computer networking in linux environments.
Go to the below link and download the latest libmnl file.
http://www.netfilter.org/projects/libmnl/downloads.html#libmnl-1.0.3
Unzip it using the below command
tar -xvf libmnl-1.0.3.tar.bz2
cd to the extracted folder
cd libmnl-1.0.3/
Install libmnl
./configure
make
sudo make install
Then you can install the libnetfilter_queue library.

error in Install previous versions of R on ubuntu

I have R 3.4.1.1 on my computer (Linux).
I want to install R version 2.14.1 since the package Rmosek does not work in newer version.
I have downloaded the R-2.14.2.tar.gz from Cran.
My problem is that I do not understand the INSTALL instructions,
It says to unpack the R sources and go to the top directory and issue the following commands:
./configure
make
I wrote the following in a terminal:
tar -zxvf R-2.14.2.tar.gz
cd Downloads
cd R-2.14.2
./configure
It is run but finally gives the error:
configure: error: --with-x=yes (default) and X11 headers/libs are not available
make
and it gives the error:
make: *** No targets specified and no makefile found. Stop.
The file explains that If my make is not called `make', set the environment variable MAKE to
its name, and use that name throughout these instructions. I really do not know how I should do it since I am new in Linux.
Is there any other instruction with more explanation? I would be very thankful in advance for your help or guidances.
Regards,
Shima.
This is answered in detail in the R installation and administration guide,
http://cran.r-project.org/doc/manuals/R-admin.html#Essential-programs-and-libraries
Unless you do not want to view graphs on-screen (or use a Mac) you
need ‘X11’ installed, including its headers and client libraries. For
recent Fedora distributions it means (at least) RPMs ‘libX11’,
‘libX11-devel’, ‘libXt’ and ‘libXt-devel’. On Debian we recommend the
meta-package ‘xorg-dev’. If you really do not want these you will need
to explicitly configure R without X11, using --with-x=no.
More specifically, for Ubuntu, this means:
sudo apt-get install xorg-dev
and then proceed with compiling and installing R.
If you have to compile R in your system and install you should have libx11-dev package installed in Ubunut.Can you check whether this package is installed or not.
Otherwise you can configure the source with this option as a work around solution only in the case if you are not going to use any GUI functionality in R.
./configure --with-x=no
You need to install these libraries:
sudo apt-get install -y libx11-dev \
xorg-dev \
libcurl4-openssl-dev
Then run:
./configure
make
And then it should work.
Good luck!

apt-get for Cygwin?

Is there any apt-get-like program for use with Cygwin?
I already tried cyg-apt but when I try I get this error:
cyg-apt: downloading: http://cygwin.mirrors.pair.com/setup-2.bz2
cyg-apt: downloading: http://cygwin.mirrors.pair.com/setup-2.ini
cyg-apt: bad URL http://cygwin.mirrors.pair.com/setup-2.ini, exiting.
Best I have ever used:
apt-cyg package manager
You can do this using Cygwin’s setup.exe from Windows command line. Example:
cd C:\cygwin64
setup-x86_64 -q -P wget,tar,gawk,bzip2,subversion,vim
For a more convenient installer, you may want to use the
apt-cyg package manager. Its syntax is
similar to apt-get, which is a plus. For this, follow the above steps and then
use Cygwin Bash for the following steps:
wget rawgit.com/transcode-open/apt-cyg/master/apt-cyg
install apt-cyg /bin
Now that apt-cyg is installed. Here are a few examples of installing some
packages:
apt-cyg install nano
apt-cyg install git
apt-cyg install ca-certificates
Update: you can read the more complex answer, which contains more methods and information.
There exists a couple of scripts, which can be used as simple package managers. But as far as I know, none of them allows you to upgrade packages, because it’s not an easy task on Windows since there is not possible to overwrite files in use. So you have to close all Cygwin instances first and then you can use Cygwin’s native setup.exe (which itself does the upgrade via “replace after reboot” method, when files are in use).
apt-cyg
The best one for me. Simply because it’s one of the most recent. It works correctly for both platforms - x86 and x86_64. There exists a lot of forks with some additional features. For example the kou1okada fork is one of improved versions.
Cygwin’s setup.exe
It has also command line mode. Moreover it allows you to upgrade all installed packages at once.
setup.exe-x86_64.exe -q --packages=bash,vim
Example use:
setup.exe-x86_64.exe -q --packages="bash,vim"
You can create an alias for easier use, for example:
alias cyg-get="/cygdrive/d/path/to/cygwin/setup-x86_64.exe -q -P"
Then you can for example install the Vim package with:
cyg-get vim
you can always make a bash alias to setup*.exe files in $home/.bashrc
cygwin 32bit
alias cyg-get="/cygdrive/c/cygwin/setup-x86.exe -q -P"
cygwin 64bit
alias cyg-get="/cygdrive/c/cygwin64/setup-x86_64.exe -q -P"
now you can install packages with
cyg-get <package>
This got it working for me:
curl https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg > \
apt-cyg && install apt-cyg /bin
No. The only officially supported tool for downloading and updating Cygwin packages is the setup.exe file you used for the initial install, although that can be invoked with command line arguments to help the process.
From that same page:
The basic reason for not having a more full-featured package manager is that such a program would need full access to all of Cygwin's POSIX functionality. That is, however, difficult to provide in a Cygwin-free environment, such as exists on first installation. Additionally, Windows does not easily allow overwriting of in-use executables so installing a new version of the Cygwin DLL while a package manager is using the DLL is problematic.
You can use Chocolatey to install cyg-get and then install your packages with it.
For example:
choco install cyg-get
Then:
cyg-get install my-package

Resources