Packages of OPAM remote can be searched but not installed - ocaml

I've set up a custom OPAM repository, for the needs of the company I'm working for.
It can be accessed through SSH.
Here is the command I used to add the remote :
opam remote add company-repo ssh://git#host:port/repo.git
I get the following error when trying to install my packages:
$ opam install <package>
Your request can't be satisfied:
- No package matches <package>.
No solution found, exiting
This is awkward because I can see them using opam search ....
Am I missing something in the process?
EDIT
I can install my packages properly on my dev environment, using opam pin. I only have the problem with the production repository.
EDIT 2
I do have run opam update.
I'm using OPAM 1.2.0.
Sadly verbose mode returns me nothing more than the previous listing.
Running opam remote returns me the following listing:
$ opam remote
10 [git] company ssh://git#host:port/opam-repository.git
0 [http] default https://opam.ocaml.org
BTW: what is the meaning of the numbers in the first column of this listing? Priority ?

I just had the same error and the issue was that there was a typo in one dependency of the <package> (see opam file). That could be a path to explore...

Related

Ansible: install package only if is the newest version

Introduction: The objetive is to install and configure a package into a on premise server (without internet connection).
I already achieved a task to install using a .deb file and the apt module, and also configure the service using the lineinfile module to edit the package configuration files.
The problem: if the server already has an old version!
I'm able to get the current version installed using the command:
dpkg-query -f '${Version}' -W packageName`
and I also developed an regex to get the number to compare.
But now I'm stuck! =/
Question:
How can I use the regex to compare the current version number with the version number to be installed?
I already read the filter documentation, but it did not rang any bells. >.<
Uninstall and install is also an option but it doesn't seems the right one.
I cannot post a comment due to <50 rep at this point so I'll try to elaborate as much as I can. I hope this does answer your question, please comment if not.
If the issue is with installing when an older version is already installed, you can use the "only_upgrade" option of the apt module:
shell: ansible-doc apt
- only_upgrade
Only upgrade a package if it is already installed.
[Default: no]
type: bool
version_added: 2.1
Then, when adding a register var to this action, you'll know if the packages was indeed upgraded, and assuming you need to push new config files due to version change, you have what you need.
The flow would be:
- name: Attempt upgrade first
apt:
deb: path/to/file.deb
only_upgrade: True
register: was_upgraded
- name: Install the package on a server that never had it
apt:
deb: path/to/file.deb
when: was_upgraded.false

How to install all rpm dependencies and map local to created YUM repository?

I have a scenario of having yum repository (say named A) with newer version of NodeJS rpm in Centos 7. When I tried to install it ends up in list of dependency error and few rpm packages was not able figure it on own by YUM. So download all the dependency rpm's and placed in created repository. Started to installing rpm using this command
rpm -ivh http-parser
Then try to get info of the installed package using this command
yum info http-parser
Following info is listed
Installed Packages
Name : http-parser
Arch : x86_64
Version : 2.7.1
Release : 8.el7
Size : 71 k
Repo : installed
Summary : HTTP request/response parser for C
URL : https://github.com/nodejs/http-parser
License : MIT
Description : This is a parser for HTTP messages written in C. It
: parses both requests and responses. The parser is
: designed to be used in performance HTTP
: applications. It does not make any syscalls nor
: allocations, it does not buffer data, it can be
: interrupted at anytime. Depending on your
: architecture, it only requires about 40 bytes of
: data per message stream (in a web server that is per
: connection).
My intention of installing this package and map to created custom repository (names as A). But the info command shows it installed over globally "Repo: installed" instead of "Repo: A". I doubted I missed few steps to install dependencies local to created repository. How do I verify whether the package installed and available local to the repository?
I would like to know whether this is the proper way of handling dependency errors in centos package installation?
Any guidance over these are appreciated. Thanks!
yum doesn't remember what repo it was installed from. When you asked yum for any info about any packages it knows about named http-parser, it told you it knows of the one that is currently installed. It uses the reserved name "installed" for that purpose.

unknown error: call function result missing 'value' for Selenium Send Keys even after chromedriver upgrade

I am getting the below error while sending keys.
Result Message:
System.InvalidOperationException : unknown error: call function result missing 'value'
(Session info: chrome=65.0.3325.146)
(Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 10.0.14393 x86_64)
I have updated the chrome driver to 2.36 but still my code search for 2.33?
Any idea ?
I've gotten the same error, please download the last ChromeDriver version and/or update chrome browser version and it will be working fine :)
https://chromedriver.storage.googleapis.com/index.html?path=2.36/
After updating the Google Chrome browser to Version 65.0.3325.146 (Official Build) (64-bit), I'm also encountered with the same error
while sending values to the input field, here's the error message...
selenium.common.exceptions.WebDriverException: Message: unknown error: call function result missing 'value'
using Chromedriver 2.32 and Google Chrome 65.0
As I did some research on the same, I found a recent commit on Google chrome v65 changelogs which help me to resolve the issue.
Solution:
Update Google Chrome to latest stable version (in my case it's v65 on 9/mar/2018)
Download and configure latest chromedriver (v2.36).
For configuring chromedriver (on Ubuntu) follow these steps...
Extract the downloaded zip file.
Copy the extracted chromedriver file to /usr/local/bin or to the location where you usually store the executable binaries.
Add the same path (where you place the chromedriver file) to environment variable PATH as
export PATH=$PATH:/usr/local/bin
For testing the installation, restart the terminal and type this command
chromedriver --version
it would show the version of chromedriver that you just installed.
Note: If the chromedriver already installed and configured then just replace the existing driver file and If you don't know where the Chromedriver binaries already stored then try to find the file using following command
sudo find -H / -type f -iname chromedriver
It is because of the update of chrome browser version from 64.xx to 65.xx
Now you have 2 options to run your tests successfully.
Downgrade your chrome browser to previous version and with the old chromedriver which you have now.
Upgrade your Chromedriver to 2.36 version with the updated Chrome browser.
visit https://chromedriver.storage.googleapis.com/index.html?path=2.36 and download the new chromedriver.
Option 2 is better.
Replace your ChromeDriver.exe with latest version.. Same can be downloaded from Google easily.
Also its better to get it done automatically by using webDriver manager as explained below -
1. Add Mvn dependency to your project POM:
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>${webdrivermanager.version}</version>
<scope>test</scope>
</dependency>
Now in your Browser instantiation class instead of using traditional way to create driver i.e. by using System.setProperty(See belwo)...
System.setProperty("webdriver.chrome.driver","src/test/resources/drivers/chromedriver.exe");
Use below approach:
WebDriverManager.chromedriver().setup();
webDriver = new ChromeDriver(chromeOptions);
And that's all, you are done!
Use below links for your reference-
What is Browser Binary Manager how to use it for Selenium
or chkout git project for same-
https://github.com/bonigarcia/webdrivermanager#webdrivermanager-as-java-dependency
Need to update chromedriver :
In console, run: chromedriver-update 2.36
The error says it all :
System.InvalidOperationException : unknown error: call function result missing 'value'
(Session info: chrome=65.0.3325.146)
(Driver info: chromedriver=2.33.506120
The error clearly complains about InvalidOperationException
Your main issue is the version compatibility between the binaries you are using as follows :
You are using chromedriver=2.33
Release Notes of chromedriver=2.33 clearly mentions the following :
Supports Chrome v60-62
You are using chrome=65.0
Release Notes of ChromeDriver v2.37 clearly mentions the following :
Supports Chrome v64-66
Your Selenium Client version is unknown to us.
So there is a clear mismatch between the ChromeDriver version (v2.33) and the Chrome Browser version (v65.0)
Solution
Upgrade Selenium to current levels Version 3.11.0.
Upgrade ChromeDriver to ChromeDriver v2.37 level.
Keep Chrome version in between Chrome v64.x-66.x levels. (as per ChromeDriver v2.37 release notes)
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
Use CCleaner tool to wipe off all the OS chores before and after the execution of your test Suite.
If your base Web Browser/Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Browser/Web Client.
Execute your #Test.
If you are on Mac:
brew upgrade selenium-server-standalone
brew upgrade chromedriver
if the above two are not installed:
brew install selenium-server-standalone
brew install chromedriver
I'm running Protractor and have encountered the same issue.
The solution in my case was rather simple.
$ npm update protractor -g
$ webdriver-manager update
If you are on the latest stable Google Chrome (e.g. 67) I recommend to:
brew uninstall chromedriver
brew tap homebrew/cask
brew cask install chromedriver
These set of commands will uninstall your current chromedriver, check for updates and install the latest found (e.g. 2.40).
Use xpaths instead of class names to locate elements
After updating chrome and its drivers it didn't helped me at all!!
I don't know how much it makes sense but it worked for me when i replaced class name with xpath. This is the xpath , i used to automate sending whatsapp message using python.
driver.find_element_by_xpath('//*[#id="main"]/footer/div[1]/div[2]/div')
previously i Was Using
driver.find_element_by_class_name('Some class Name Here')
In my case the team I'm on points selenium to a specific chromedriver file we had. In order to get Selenium to use the updated chromedriver, I first installed it with brew and then created a symbolic link to point where Selenium looks for it:
brew install chromedriver
ln -s /usr/local/Cellar/chromedriver/2.36/bin/chromedriver /path/where/selenium/expects/chromedriver
On the chance this might be helpful to someone I needed an additional step:
I am on MacOS X. I did
brew upgrade chromedriver
bundle exec chromedriver-upgrade
I have the chromedriver-helper gem installed, but it is stashed and requires the "bundle exec" prefix or the shell can't find the command.
The above fixed my problem.
As mentioned by others, the latest chromedriver did the trick for me. In case you downloaded the driver manually and want to tell appium to use the new chromedriver you can do so by this command:
appium --chromedriver-executable /path/to/driver/chromedriver ....
I'm running Protractor (webdriver-manager) with Selenium in a Windows environment, and I had to do the following:
webdriver-manager update --versions.chrome="2.36" (This downloaded the new Chromedriver to the right path but didn't enable it in protractor.)
Edit %userprofile%\AppData\Roaming\npm\node_modules\protractor\config.json and changed the chromedriver value from 2.32 to 2.36.
Delete my old chromedriver_2.32.exe from %userprofile%\AppData\Roaming\npm\node_modules\protractor\selenium for good measure (not sure if that was required.)
Or:
When another Chromedriver update became needed, I was no longer able to update this way. A configuration setting still expected the old path and filename, and I couldn't figure out where to change that setting. So I just renamed the latest chromedriver to "chromedriver.exe" and stuck it in C:\Windows\system32 (which is always referenced by PATH). Crude, but effective.
If you're using gulp-protractor plugin, make sure to update it as well.
I don't know if you're still on this, but I was receiving a similar error. I had the latest version of chromedriver in my PATH and Google Chrome was updated. I run Python 3.6 on windows 10 x64 bit. What I was getting trying to select a value from a dropdown menu on a webpage. The weird thing was, it would select the dropdown value correctly and the page would be updated nicely, but I'd receive that stupid error anyway and my script would freeze. So I just made an exception error handler for it, because like I said it selected the dropdown value correctly, so I just wanted to bypass that dumb error message:
# select by value
try:
select.select_by_value('100')
except:
pass
hopefully someone finds this helpful.
The issue is because of mismatch in chromedriver and chrome browser version.
Below link specifies the versions of chromedriver supporting the chrome browser's version.
http://chromedriver.chromium.org/downloads

command opam update fail

On my system, ArchLinux x86_64, I have installed the package opam-git which was working the last time I used it.
The following command opam update fail with this message:
opam update
=-=- Updating package repositories =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ERROR] curl: code 404 while downloading https://opam.ocaml.org/1.3/urls.txt
[ERROR] Could not update repository default
In this link https://github.com/ocaml/opam-repository/issues/6231 they say:
it is 2.0.dev now
What should I do to resolve my problem?
This is a git devel version of opam, did I get this right? Current opam release is 1.2.
And it is from Arch AUR?
It looks like AUR published an inconsistent opam dev state from git.
Once the git is consistent (pull request done) file a bug report, wait for the update, and do a new opam install from AUR.
Or just rely on the current versions from ocaml.org, IMO the premier source.
BTW when encountering problems with your local .opam directory and the compiled ocaml packages: the whole stuff can be deleted and reinstalled without any side effects (provided your own source is somewhere else). This is the functional paradigm.
/Str.

OPAM: how to locally reinstall a package without re-downloading it?

I want to locally recompile/reinstall a package that has already been downloaded via OPAM, but without downloading it again.
opam reinstall seems to always re-download the package, and I see no option to disable it.
Here are a few reasons one might want to perform this local re-installation:
The local sources have been modified, and the person wants to apply the modifications, without having to manually rebuild everything from the original source code;
There is currently no Internet connection, or it is slow/capped.
opam will try to keep in sync downloaded package with the upstream one. That means, that if package is in local cache and it doesn't differ from the upstream package, then it wouldn't be downloaded.
If you want to change source code locally, then you need to pin the package.
Other option is to create your own repository and add it to your opam. Your local repository can contain all the packages or only several that you're interested. For handling local repositories there is an opam-admin tool.
Creating your own repository is not a very easy task, so I would suggest you to use pin command, and pin packages, that you want to have locally, to the specified local path.
Example (requires opam 1.2 or later)
opam source lwt.2.4.8
opam pin add lwt lwt.2.4.8
lwt was chosen arbitrary, just because it is short. The first command will download the sources of the specified version and put them in folder lwt.2.4.8 along with the opam file. The second will force opam tool to use this particular folder as a source for lwt package.