I've been trying to build grafana from its source code on windows by following the instructions here
I am stuck and am failing to set the GOPATH path properly.
I set it to the default go directory in C:\myname but whenever I try to change to that directory using the command "cd $GOPATH/src/github.com/grafana/grafana" it says the system cannot find the specified path.
And even if I put the path manually and in the directory try to run "go run build.go setup" the system cannot find the file specified.
If someone could help me that'd be great!
Try to create a new empty folder:
mkdir C:\myFolder
cd C:\myFolder
set GOPATH=C:\myFolder
go get github.com/grafana/grafana
That should create a src\github.com\grafana\grafana folder, with the sources inside.
Related
I am attempting to test a Golang application hauser locally on via -bash CLI before deploying on a VM.
Per the documentation, I compiled locally and copied the example-config.toml file. I then mapped to the GOPATH and opened hauser.exe to open config.toml file. However, when I execute, it returns open config.toml: no such file or directory
C02Z30ANLVDV:~ pmcgin2$ $GOPATH/bin/hauser -c Documents/go/bin/config.toml
2020/08/14 18:05:23 Cannot find folder , make sure it exists
C02Z30ANLVDV:~ pmcgin2$ open Documents/go/bin/config.toml
No application knows how to open /Users/pmcgin2/Documents/go/bin/config.toml.
Is there an alternative command I can execute to override the default config.toml location for an application like this?
There are two possibilities to solve your issue:
give an absolute path as argument:
$GOPATH/bin/hauser -c /Users/pmcgin2/Documents/go/bin/config.toml
give a relative path from the binary location:
$GOPATH/bin/hauser -c config.toml
Generally, it is easier to use absolute paths.
I've installed jenkins on windows, and I wanted to use jenkins command to start and stop the program from anywhere in the system.
It turns out that after configuring jenkins and creating the environment variable I get the error below everytime I execute "jenkins start" from outside C:\Program Files (x86)\Jenkins.
Is there any configuration missing?
ERROR
System.IO.FileNotFoundException: Unable to locate jenkins.xml file within executable directory or any parents
at winsw.ServiceDescriptor..ctor()
at winsw.WrapperService.Run(String[] _args, ServiceDescriptor descriptor)
at winsw.WrapperService.Main(String[] args)
SYSTEM ENVIRONMENT VARIABLES
JENKINS_HOME:
C:\Program Files (x86)\jenkins
Path:
%JENKINS_HOME%
You need to run your jenkins install jenkins.xml at the place where is your jenkins.xml
1 rename winsw.exe to jenkins.exe
2 cd c:/...where is your jenkins.exe
3 run jenkins.exe install jenkins.xml (both files must be in the same directory)
In Windows 10, the path of the configuration file (config.xml) is:
C:\ProgramData\Jenkins.jenkins
The Folder ProgramData is hidden, so go to the address bar and type or use the CLI.
Solution: Save your jenkins-agent file as xml format. not just jenkins-agent.xml
we can use notepad++ to save the xml type. similarly remove .exe at end of jenkins-agent.exe
Hope its useful.... cheers !!
I'm having trouble with the 'Run Script' in the Xcode IDE. I'm able to download a file from a server using this script below, straight into a directory in Xcode, which can be viewed, by way of right clicking on the folder in the IDE where the download has been sent to, however although it appears here, its not appearing in the 'Copy Bundle Resources' nor in the Xcode resources folder, so when trying to pull this file into the code, I get file doesn't exist.
I'm aware of how to add the file manually(+), however this would be better if it run's automatically in the script.
Can anyone help with this Bash Script below, I've tried to copy (cp) to ${PRODUCTS_DIR} and ${BUILT_PRODUCTS_DIR} but its not copying over for some reason. I'm able to (mv) move the file but still this does appear in the 'Copy Bundle Resources'? Anyone got any clues to this? Thanks in advance.
fileToDownload=$(ssh $Username#server1 ls -t /doc_test_control/the_test_foler/myFile.txt)
echo "File to download: $fileToDownload"
scp $Username#server1:$fileToDownload "${SRCROOT}/Mobile-App-iOS/Test_Foler/"
echo "File downloaded to : ${SRCROOT}/"
mv "${SRCROOT}/Mobile-App-iOS/Test_Foler/""* "${BUILT_PRODUCTS_DIR}"
ls -l "${SRCROOT}/Mobile-App-iOS/Test_Foler/"
echo "DONE"
It looks like you need to copy the downloaded file inside the Bundle using bash commands in the Run Script phase itself. Please use the following script to copy the resource to the bundle.
cp downloadedFile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/
UNLOCALIZED_RESOURCES_FOLDER_PATH is nothing but app path itself. Please see its value in Build logs.
export UNLOCALIZED_RESOURCES_FOLDER_PATH=TestProject.app
I tested this with my local file in Desktop folder and found it to be working.
You cannot use "Copy Bundle Resource" phase to copy the downloaded file at compile time. Because, to use "Copy Bundle Resource", it has to be added to the Target which is not possible when it is downloaded during compile time.
Hi i have been trying to install the server weblogic of oracle on windows 8.1 but I obtain the follow when I run the configure.cmd file:
ERROR: You must set MW_HOME and it must point to a directory where an
installation of WebLogic exists. Ensure you point this variable to the
extract location of the zip distribution.
How do I correct this error?
There's a readme file linked from the product download page http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html although your experience would suggest that defining MW_HOME isn't optional! ...
1. Extract the contents of the zip to a directory (eg: /home/myhome/mywls)
This will create a base directory named wls12130 under /home/myhome/mywls
MW_HOME will be the entire directory including the base directory.
(eg: MW_HOME will be /home/myhome/mywls/wls12130).
2. Setup JAVA_HOME and optionally, MW_HOME variables in the current shell as required
for the target platform.
Windows
> set JAVA_HOME=C:\home\myhome\myjavahome
> set MW_HOME=C:\home\myhome\mywls\wls12130
3. Run the installation configuration script in the MW_HOME directory.
This step is required to be run only once. If you move the installation to
another location/machine, you need to rerun this step.
Windows
> configure.cmd
Environment variables are not set properly.
1.- Create product directory
mkdir E:\weblogic\wls << I'm sure you did it and Weblogic binaries are already installed.
2.- set environment variables properly
set JAVA_HOME=_path_to_\jdk1.7.0
set MW_HOME=E:\weblogic\wls
(change above settings according to your installation)
3.- Run configure.cmd
I installed Jenkins om my Snow Leopard laptop. I assigned the user "jenkins" to it's home dir etc. Next, I basically followed this tutorial.
Now, when I run a build, I get an error:
/Users/Shared/Jenkins/Home/jobs/projectname/workspace/build.xml:78: Execute failed: java.io.IOException: Cannot run program "phpmd": error=2, No such file or directory
Also, he gives the same errors for phploc etc.
When I run phpmd on the commandline, everything is fine. Also when I login as user jenkins with "su jenkins" and I try to run the command on the command line, everything is fine too.
I believe the problem is that Jenkins is unable to find the command. Probably because it's not in the /usr/bin dir? I added a .bash_profile file with the export path to /usr/local/bin, but even that doesn't make a difference. So, anyone know what exactly the problem is?
You can see the environment variables (including the PATH) under "System Information" on the page of the slave. You can adjust these variables as well as set tool locations on the slave configuration page. To get to those pages, click on the name of a slave on the main page.
I tried to set the PATH environment variable as described above, ie
"manage nodes"->"[node]"->"configure"
and then "name" PATH and "value" /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
For some reason this did not work - I visited "manage nodes"->"[node]"->"system info"
and the PATH value had not changed and the job continued to not work.
This was with version 1.462 and slave.jar 2.13.
My workaround was to set an explicit path for the tool (git in my case) in the "tool locations" section of the node configuration page.
I kindly suggest to replace your phpmd command by a "echo $PATH" so you can see what's in the PATH in the context where you are starting phpmd.