How to install Pylucene locally without root access on a server? - makefile

recently I try to install pylucene on a server in my own home directory because I have no root priviledge.
Now I have successfully installed ant and JCC locally on CentOS under my own home directory. The directory of JCC is "/home/myname/.local/lib/python2.6/site-packages"
I have also successfully "make" under the pylucene directory, but when "make install" it shows that it tries to move some files into the directory " /usr/lib64/python2.6/site-packages/" which I have no permission to access it.
I do changed the Makefile several places as required.
In the comments it says:
PREFIX: where programs are normally installed on your system (Unix).
But there is no variable named as PREFIX
I changed
PREFIX_PYTHON=/usr
ANT=/home/myname/packages/apache-ant-1.9.7/bin/ant
PYTHON=$(PREFIX_PYTHON)/bin/python2.6
JCC=$(PYTHON) -m jcc.__main__
NUM_FILES=8
When I read the Makefile I do not see a environmental variable that controls the installing directory or I miss something ?
SOlved
Thank you guys. I have figured it out.
I just move the builded “lucene” folder directly to my local "site-packages" directory and it works.

INSTALL_OPT=--prefix <path>
The homebrew formula has an example of this.

Related

How to properly install GO with paths and all?

I have installed GO, setup the paths but when i run a file i get this error:
error!! exec: "sqlboiler": executable file not found in $PATH
exec: "sqlboiler": executable file not found in $PATH
exec: "sqlboiler": executable file not found in $PATH
exit status 3
What is going wrong?
The installation instructions are good, https://go.dev/doc/install. However, for me un Ubuntu 20.4 in wsl2, the suggested path for the binaries wasn't enough. Only go and gofmt are added to /usr/local/go/bin.
I did add the below to my .bashrc, since go install puts the binaries in this location on my system.
export PATH="$HOME/go/bin:$PATH"
Note, that the path to the binaries may differ on your system, so you have to adjust it accordingly.
Any binary you install with go install that is added to this path will be available to your shell afterwards.
For example:
$ go install github.com/volatiletech/sqlboiler/v4#latest
$ go install github.com/volatiletech/sqlboiler/v4/drivers/sqlboiler-psql#latest
$ whereis sqlboiler
sqlboiler: /home/blue/go/bin/sqlboiler
Potentially, you also need some database packages to your system. I am not sure on this any more. For example, you could add some Postgres libs if you are using Postgres. You have to see if it works without.
apt-get install postgresql-client-common postgresql-client-12
How to properly install GO with paths and all?
Install Go with the installer (Windows) or archive (extract into /usr/local on Linux/Mac).
When installing from archive, manually add the directory path where the go binary is located (/usr/local/go) to PATH.
Set GOPATH to a directory path wherein to contain bin, pkg and src sub-directories.
Add ${GOPATH}/bin to PATH.
What is going wrong?
The program you are running is trying to run the executable sqlboiler, which cannot be found in any of the directories specified in PATH.

How to install an ELF 64-bit LSB executable on Debian?

I'm trying to install the mips-linux-gnu-gcc Toolchain on Debian 7 from a guide, which has the instructions to install it from a directory on the machine (which I already sent in) and has the following command to do so:
export PATH=toolchain/bin/path:$PATH
and the next step is to check it's version:
mips-linux-gnu-gcc --version
But the only result I have is the "command not found result", I made sure the files are inside the folder and they are, and checking the mips-linux-gnu-gcc file I have the following result:
Am I doing something wrong? I have no experience with this kind of files and I haven't found any other way to install it, so I really need help with this :/
I solved it! the problem was the directory that I was exporting to PATH, since I installed everything on the root folder I had to put /root/ at the start of the url indicated in the instruction guide.

Installation of VCPKG followed by any call to "vcpkg install" results in "Changing the working dir failed"

When I follow the steps in the VCPKG documentation page to install on Windows, the noted steps fail on the line .\bootstrap-vcpkg.bat.
Specifically, these are the steps I follow, exactly according to the instructions at the above link.
Run Powershell (not as administrator)
cd <parent_directory>
git clone https://github.com/Microsoft/vcpkg.git
cd .\vcpkg\
.\bootstrap-vcpkg.bat
.\vcpkg integrate install
All above steps (seem to) succeed, until the last (in red, below).
I see the following output:
(Note: the screenshot also shows an additional line at the end - in which I attempted to install a desired package for use in a project - which failed with the same error.)
I looked through the source code of vcpkg and found that the offending line of code looks like this (vcpkg.cpp):
Modifying the vcpkg.cpp source to display the missing path, rebuilding, and testing shows that the missing directory is:
<vcpkg>/installed/...
...But the installed directory does not exist in the vcpkg root directory.
Because I am following the basic installation instructions from the vcpkg documentation, I'm stumped as to what I am doing wrong, what is wrong in my setup, or what to do about it.
Can someone please explain why installation of VCPKG followed by any call to "vcpkg install" results in the error Changing the working dir failed?
I had mistakenly defined the VCPKG_ROOT environment variable to a directory that is a subdirectory of the root directory of the vcpkg project.
This is an easy mistake to make, as I describe below.
The vcpkg executable itself checks for the existence of the VCPKG_ROOT environment variable, and if present, uses its value to override the path to the root folder for the vcpkg project that is used internally by the running vcpkg binary.
I created an environment variable with the same name (VCPKG_ROOT) for a different purpose - so that my own downstream application could be provided the path to the include files for a library installed by vcpkg. It makes sense that I would choose the name VCPKG_ROOT, because in fact vcpkg, by default, installs libraries into a subdirectory of its own root directory.
Specifically:
If the root directory of the 'vcpkg' project is <vcpkg>...
...then by default the vcpkg executable installs libraries such that the include paths for the libraries that are installed are placed in <vcpkg>\installed\...\include\
(And other library files, such as binaries, are also placed in directories nested within <vcpkg>.)
The problem was that I defined VCPKG_ROOT to be the second bullet, not the first. So it's an easy mistake to make, given that the choice of name "VCPKG_ROOT" kind of makes sense in both scenarios!
I just suggested an improved error message via a pull request to the vcpkg project - if accepted, this might save some other poor soul the stress and lost time of tracking down this glitch.

On Mac OSX 10.8.4 where can I find the Go installation?

I'm following this online book in my path to learn Go during the weekends.
I've tried running the go help gopath command it just returns example paths and how they relate to each other in packages and source directories - it's doesn't actually say where I can find the go folder.
The book specifically mentions:
First create a new folder where we can store our program. The
installer you used in chapter 1 created a folder in your home
directory named Go. Create a folder named
~/Go/src/golang-book/chapter2. (Where ~ means your home directory)
From the terminal you can do this by entering the following commands:
I used the default installer on the Go homepage, so assume that everything installed in the default folder the installer comes with.
If I cd in terminal to the ~/ folder and then use ls, there is no /Go folder.
How can I find this folder in order to follow the online book properly? I'm assuming he's using this folder structure for a reason and would rather not deviate and learn how packages work, etc.
The instructions say:
Create a folder named ~/Go/src/golang-book/chapter2
I interpret that to mean that YOU create the folder named "~/Go/src/golang-book/chapter2". The installer doesn't create this, but you can.
E.G. in your Terminal:
mkdir ~/Go
mkdir ~/Go/src
mkdir ~/Go/src/golang-book
mkdir ~/Go/src/golang-book/chapter2

Libcurl.dll error with Git push

Recently I installed Git (Using Bit bucket for repository). I configured everything according to different guides I found on the net, but whenever I use the command git push -u origin --all I get the following error:
The procedure entry point curl_multi_timeout could not be located in the dynamic link library libcurl.dll
Go to the folder where Git is installed (defalut: C:\Program Files\Git).
Copy the file "libcurl.dll" in Git installation folder (C:\Program Files\Git\bin\libcurl.dll).
Paste it in location where the git.exe exists (C:\Program Files\Git\libexec\git-core).
This should fix the issue, since now it will check for the lib in current executing folder before falling back to systems folder.
It looks like it's an OpenOffice conflict from their libcurl. From my understanding, Openoffice put an old libcurl.dll in the system directory.
Try to remove libcurl.dll from C:\Windows\sysWOW64 and/or C:\Windows\System32 (Reinstalling Git or uninstalling OpenOffice doesn't seem to fix the problem).
As a side note for anyone using pre-built libcurl in their projects: this can be caused because you have libcurl.dll in the root of the folder you are trying to push. Windows will load the library in your project folder before the one with Git first.
The solution is simple -- remove or move libcurl.dll in your project.
This is the same thing with the windows application installed in your local appdata directory.
To copy the file from :
C:\Users\YOUR-WINDOWS-COUNT\AppData\Local\GitHub\PortableGit_xxxx-A-BIG-NUMBER-XXXXXXXXXXXXX\libexec\git-core\bin\libcurl.dll
to the directory:
C:\Users\YOUR-WINDOWS-COUNT\AppData\Local\GitHub\PortableGit_xxxx-A-BIG-NUMBER-XXXXXXXXXXXXX\libexec\git-core
seems to work.
Follow these steps (this worked for my 64 bit win7):
a) Copy libcurl.dll from C:\Windows\sysWOW64\libcurl.dll
to some temporary location.
b) Remove libcurl.dll from C:\Windows\sysWOW64\libcurl.dll
c) Try cloning repository from Git Windows App.
Enjoy! :)
Remove libcurl.dll from C:\Windows
After that it worked
I was setting things up for http access. I was getting a similar error (libcurl-4.dll is missing) on the client. The fix turned out to be that some of the housekeeping files deep in the repository tree on the server were owned by 'root' rather than 'apache'. Correcting that corrected the missing curl error on the client.
For me (64 bit Windows7), uninstalling GIT and reinstalling it was the only solution that worked.

Resources