Error when trying install yii2-date-picker-widget - yii2

I am new in yii2 framework. When I am trying to install widget, getting error message. My command is here:
sudo composer require 2amigos/yii2-date-picker-widget:~1.0
And error is here:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package bower-asset/bootstrap-datepicker could not be found in any version, there may be a typo in the package name.
Problem 2
- 2amigos/yii2-date-picker-widget 1.0.x-dev requires bower-asset/bootstrap-datepicker 1.4.0 -> no matching package found.
- 2amigos/yii2-date-picker-widget 1.0.5 requires bower-asset/bootstrap-datepicker 1.4.0 -> no matching package found.
- 2amigos/yii2-date-picker-widget 1.0.4 requires bower-asset/bootstrap-datepicker 1.4.0 -> no matching package found.
- 2amigos/yii2-date-picker-widget 1.0.3 requires bower-asset/bootstrap-datepicker 1.4.0 -> no matching package found.
- 2amigos/yii2-date-picker-widget 1.0.2 requires bower-asset/bootstrap-datepicker 1.4.0 -> no matching package found.
- 2amigos/yii2-date-picker-widget 1.0.1 requires bower-asset/bootstrap-datepicker 1.4.0 -> no matching package found.
- 2amigos/yii2-date-picker-widget 1.0.0 requires bower-asset/bootstrap-datepicker 1.4.0 -> no matching package found.
- Installation request for 2amigos/yii2-date-picker-widget ~1.0 -> satisfiable by 2amigos/yii2-date-picker-widget[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.x-dev].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see https://getcomposer.org/doc/04-schema.md#minimum-stability for more details.
Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.
Does anybody can help me? Appreciate every answer!

Have you tried to launch:
composer global require "fxp/composer-asset-plugin:~1.1.1"

STEP -1
Run this command on Terminal at Project main folder
---->curl -s http://getcomposer.org/installer | php
STEP -2
Successfully installation after run this command
--->php composer.phar require kartik-v/yii2-widget-datepicker "*"
you can see this contant in advanced->composer.json
"kartik-v/yii2-widget-datepicker": "*"
If you can't see this, means you missing some...
STEP -3
Define this library in views-> _form.php
use kartik\date\DatePicker;
STEP -4
And last define this given below code in your form at date field
<?= $form->field($model, 'xyz_field')->widget(DatePicker::ClassName(),
[
'name' => 'check_issue_date',
// 'value' => date('d-M-Y', strtotime('+2 days')),
'options' => ['placeholder' => 'Select issue date ...'],
'pluginOptions' => [
'format' => 'yyyy/dd/mm',
'todayHighlight' => true
]
]);?>

Related

How to solve kartik\dialog\Dialog not found in yii2?

I can run controller in development correctly but I facing error kartik\dialog\Dialog not found in production
like thise picture
Why this thing happen?
How I can check it? in Vendor folder maybe.
and How to solve it?
Here is my composer.json
{
"name": "vendor/myweb",
"description": "Description of project myweb.",
"authors": [
{
"name": "Administrator",
"email": "developer1#myweb.com"
}
],
"require": {
"kartik-v/yii2-dialog": "*"
}
}
Thanks in advance.
Check in vendor for this, if it does not exist, go to point 2.
Add this line to require section in project-directory/composer.json file
"kartik-v/yii2-dialog": "*"
Then run in project directory command:
composer update
I hope you found the answer by now !
IF NOT:
I have struggled with this problem long enough to feel desperate :)
here's what I ended up doing:
1- install Dialog using composer : composer.phar require kartik-v/yii2-export "*
if it gives these errores :
Problem 1
- kartik-v/yii2-dialog dev-master requires bower-asset/bootstrap3-dialog ~1.34 -> no matching package found.
- kartik-v/yii2-dialog v1.0.1 requires bower-asset/bootstrap3-dialog ~1.34 -> no matching package found.
- kartik-v/yii2-dialog v1.0.0 requires bower-asset/bootstrap3-dialog ~1.34 -> no matching package found.
- kartik-v/yii2-dialog 1.0.x-dev requires bower-asset/bootstrap3-dialog ~1.34 -> no matching package found.
- Installation request for kartik-v/yii2-dialog #dev -> satisfiable by kartik-v/yii2-dialog[dev-master, 1.0.x-dev, v1.0.0, v1.0.1].
You need to run this command: composer global require "fxp/composer-asset-plugin:^1.2.0"
it rebuild dependencies and set jquery libraries to match with the ones required by Kartik Dialog. Good luck

Cabal ExitFailure 1

I'm getting this error when trying to install csv using Cabal (OS X):
Resolving dependencies...
Configuring csv-0.1.2...
Building csv-0.1.2...
Failed to install csv-0.1.2
Build log ( /Users/roshnal/.cabal/logs/csv-0.1.2.log ):
Configuring csv-0.1.2...
Building csv-0.1.2...
Preprocessing library csv-0.1.2...
[1 of 1] Compiling Text.CSV ( Text/CSV.hs, dist/build/Text/CSV.o )
Text/CSV.hs:70:1:
Bad interface file: /Library/Haskell/ghc-7.10.2-x86_64/lib/parsec-3.1.9/Text/ParserCombinators/Parsec.hi
Something is amiss; requested module parsec-3.1.9#parse_8fSmqig53hOL2SEu1k9Tv0:Text.ParserCombinators.Parsec differs from name found in the interface file AwpZ7A1As1bGsDMsWSTZ1J:Text.ParserCombinators.Parsec
cabal: Error: some packages failed to install:
csv-0.1.2 failed during the building phase. The exception was:
ExitFailure 1
I tried updating Cabal, ghc-pkg recache, and as another answer on SO suggested, setting library-profiling to False (in ~/.cabal/config). None of them are working.
Any idea what I can do to install this package? Earlier I have installed other packages using cabal install successfully.
Thanks!
EDIT
As ErirR suggested in his answer, I ran ghc-pkg list and this is the output I got. I don't appear to be having multiple installs of parsec.
/Library/Frameworks/GHC.framework/Versions/7.10.2-x86_64/usr/lib/ghc-7.10.2/package.conf.d
Cabal-1.22.4.0
GLURaw-1.5.0.1
GLUT-2.7.0.1
HTTP-4000.2.20
HUnit-1.2.5.2
ObjectName-1.1.0.0
OpenGL-2.12.0.1
OpenGLRaw-2.5.1.0
QuickCheck-2.8.1
StateVar-1.1.0.0
array-0.5.1.0
async-2.0.2
attoparsec-0.13.0.1
base-4.8.1.0
bin-package-db-0.0.0.0
binary-0.7.5.0
bytestring-0.10.6.0
case-insensitive-1.2.0.4
cgi-3001.2.2.2
containers-0.5.6.2
deepseq-1.4.1.1
directory-1.2.2.0
exceptions-0.8.0.2
fgl-5.5.2.1
filepath-1.4.0.0
ghc-7.10.2
ghc-prim-0.4.0.0
hashable-1.2.3.3
haskeline-0.7.2.1
haskell-src-1.0.2.0
hoopl-3.10.0.2
hpc-0.6.0.2
hscolour-1.23
html-1.0.1.2
integer-gmp-1.0.0.0
mtl-2.2.1
multipart-0.1.2
network-2.6.2.1
network-uri-2.6.0.3
old-locale-1.0.0.7
old-time-1.1.0.3
parallel-3.2.0.6
parsec-3.1.9 // <-- Here's parsec
pretty-1.1.2.0
primitive-0.6
process-1.2.3.0
random-1.1
regex-base-0.93.2
regex-compat-0.95.1
regex-posix-0.95.2
rts-1.0
scientific-0.3.3.8
split-0.2.2
stm-2.4.4
syb-0.5.1
template-haskell-2.10.0.0
terminfo-0.4.0.1
text-1.2.1.3
tf-random-0.5
time-1.5.0.1
transformers-0.4.2.0
transformers-compat-0.4.0.4
unix-2.7.1.0
unordered-containers-0.2.5.1
vector-0.11.0.0
xhtml-3000.2.1
zlib-0.5.4.2
This SO thread might be relevant:
"requested module differs from name found in the interface file"
I would run ghc-pkg list and see if you have multiple installs of the parsec package.

3rd party Framework Library not loaded: 'Image not found'

I am upgrading a framework to latest version. Earlier integration (>2 years old) had framework directly copied in the project; now getting cocoapod (0.39.0) to get framework integrated with project using xcode (7.2.1) and objective-c project.
Upon run, it generates following error:
dyld: Library not loaded: #rpath/name.framework/name
Referenced from:
/Users/xyz_xyz/Library/Developer/CoreSimulator/Devices/xxxxxxx/data/Containers/Bundle/Application/xxxxxxx/appname.app/appname
Reason: image not found
"Pod" xcode-project has correct reference and framework is present in corresponding folder
Found that nameFramework isn't linked (added) in any of the build phases. I am new to using cocoapods and not sure what changes would be necessary in Xcode build settings to make transition from directly-embedded framework to cocoapods based integration.
how to get past "dyld: Library not loaded" error?
What phase should I use to reference name.Framework during build as it's not getting generated?
How to copy bundle resources from Pod to project? Dragging-n-drop Pods/name/Resources/name.bundle prompts "copy item if needed" dialog. <- I don't think I need to do this when using cocoapods.
[update] Integration using cocoapods works fine when a sample or new project is used. It's something in the current project settings that's causing the issue.
Podfile:
platform :ios, '8.0'
# use_framework for swift based pod integration. requires cocoapod 0.39.0
#use_frameworks!
pod 'GTMOAuth2'
pod 'Typhoon'
pod 'Alamofire'
# Issue with name
pod 'name', podspec:'https://customers.pspdfkit.com/cocoapods/.../latest.podspec'
target :ABC do
pod '...', '~>1'
end
target :XYZ do
pod '...', :path => 'submodules/...'
end
[Update]
- Upgraded to CocoaPods 1.0.1 & modified the Podfile to uncomment use_frameworks!, and make other changes that are required for 0.39.0 to 1.0.1 migration. Here is the updated Podfile.
platform :ios, '8.0'
# use_framework is required for dynamic links (swift) based pod integration.
use_frameworks!
target 'XYZ' do
pod 'GTMOAuth2'
pod 'Alamofire'
pod 'name', podspec:'https://customers.name.com/cocoapods/.../latest.podspec'
target :XYZ-A do
pod 'XYZ-iOS-SDK', :path => 'submodules/xyz-ios-sdk'
end
end
Fixed errors such as following by adding $(inherited) flag (where applicable)
[!] The XYZ-v2 [Release] target overrides the OTHER_LDFLAGS build setting defined in ...
Progress after above changes, Pods/Target Supported Files/XYZ-v2/ has Pods-XYZ-v2-frameworks.sh and resources.sh; earlier frameworks.sh was missing. Following is partial content of the framworks.sh, and it does contain copy instructions.
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "$BUILT_PRODUCTS_DIR/GTMOAuth2/GTMOAuth2.framework"
install_framework "$BUILT_PRODUCTS_DIR/GTMSessionFetcher/GTMSessionFetcher.framework"
install_framework "$BUILT_PRODUCTS_DIR/GoogleAPIClient/GoogleAPIClient.framework"
install_framework "$BUILT_PRODUCTS_DIR/Mantle/Mantle.framework"
install_framework "${PODS_ROOT}/PSPDFKit/PSPDFKit.framework"
install_framework "$BUILT_PRODUCTS_DIR/SSKeychain/SSKeychain.framework"
fi
// and for "Release" & "Distribution" as well..
Now I am trying to resolve compile errors upon build, which are related to static vs dynamic library includes.
/path../Pods/SSKeychain/Sources/SSKeychain.h:65:1: Duplicate interface definition for class ‘SSKeychain'
[Updated] Posted a new question: CocoaPods 1.0.1 Redefinition of 'XYZ', Redefinition of enumerator 'ABC', Duplicate interface definition for 'MNO'
Related:
OS X Framework Library not loaded: 'Image not found'
Seems relevant: https://github.com/CocoaPods/CocoaPods/issues/4772
Try using use_frameworks! (it's currently commented out). PSPDFKit is a dynamic framework, so you need to enable this option.
Also try it with the newest Xcode and CocoaPods >= 1.0.0. Older versions might not work correctly.
You can find more information about PSPDFKit integration via CocoaPods here: https://pspdfkit.com/guides/ios/current/getting-started/using-cocoapods
If all of this doesn't help you can reach the PSPDFKit developers directly at https://pspdfkit.com/support/request
same issue on dyld: Library not loaded: #rpath/TwilioAccessManager.framework/TwilioAccessManager
Reason: image not found
I had the same problem, this fixed it for me.I Changed Framework status required to optional .

JBoss Wildfly 10 MYSQL Driver install problems

I am attempting to install a MySQL Driver for WildFly 10.0 bue running into some issues.
I am follwowing these instructions here
I have used Maven to get the driver JAR (This worked fine.)
mvn dependency:copy -Dartifact=mysql:mysql-connector-java:5.1.18 \
-DoutputDirectory=/path/to/SERVER_HOME/modules/com/mysql/jdbc/main/
And am attempting to run this command to setup the MySql driver in JBOSS
./path/to/SERVER_HOME/bin/jboss-cli.sh --file=/path/to/mysql-database-config-wildfly.cli
I get this error:
/apps/wildfly/bin/jboss-cli.sh --file=/home/ec2-user/aerogear-unifiedpush-server-1.1.0.Final/databases/mysql-database-config-wildfly.cli
07:24:48,338 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 4) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "mysqlup")
]) - failure description: "WFLYJCA0041: Failed to load module for driver [com.mysql.jdbc]"
The batch failed with the following error (you are remaining in the batch editing mode to have a chance to correct the error): {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "WFLYJCA0041: Failed to load module for driver [com.mysql.jdbc]"}}
As this is a fresh install Im stumped as to what might be the issue. I haven't used JBoss before so I am hoping someone can help me out and point me in the right direction.
I did not read the full user guide, but you're missing the adding of the module. Simply just copying the dependency to the modules directory will not work. You need to use the module add CLI command. Here's an example for PostgreSQL.

MySql QT QMYSQL driver not loaded

I try to use the MySQL module from QT but without result, the module is present but Qt does not load it. I have this error
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7
QSqlError("", "Driver not loaded", "Driver not loaded")
if I make a ldd libqsqlmysql.so I get this result
linux-vdso.so.1 (0x00007ffe89950000)
libmysqlclient_r.so.16 => not found
libQt5Sql.so.5 => /opt/Qt/5.4/gcc_64/plugins/sqldrivers/./../../lib/libQt5Sql.so.5 (0x00007fdc67aaf000)
libQt5Core.so.5 => /opt/Qt/5.4/gcc_64/plugins/sqldrivers/./../../lib/libQt5Core.so.5 (0x00007fdc67372000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fdc6706b000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fdc66cc2000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fdc66aa4000)
libicui18n.so.53 => /opt/Qt/5.4/gcc_64/plugins/sqldrivers/./../../lib/libicui18n.so.53 (0x00007fdc66658000)
libicuuc.so.53 => /opt/Qt/5.4/gcc_64/plugins/sqldrivers/./../../lib/libicuuc.so.53 (0x00007fdc662cd000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fdc660c8000)
libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007fdc65ec6000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fdc65cbe000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fdc659c5000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fdc656c4000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fdc654ae000)
/lib64/ld-linux-x86-64.so.2 (0x00007fdc67f1c000)
libicudata.so.53 => /opt/Qt/5.4/gcc_64/plugins/sqldrivers/./../../lib/libicudata.so.53 (0x00007fdc63e25000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fdc63be8000)
the problem is I think this line libmysqlclient_r.so.16 => not found
If I make a locate mysqlclient I get this reuslt
/usr/lib/x86_64-linux-gnu/libmysqlclient.so.18
/usr/lib/x86_64-linux-gnu/libmysqlclient.so.18.0.0
/usr/lib/x86_64-linux-gnu/libmysqlclient_r.so.18
/usr/lib/x86_64-linux-gnu/libmysqlclient_r.so.18.0.0
/usr/share/doc/libmysqlclient18
/usr/share/doc/libmysqlclient18/NEWS.Debian.gz
/usr/share/doc/libmysqlclient18/changelog.Debian.gz
/usr/share/doc/libmysqlclient18/changelog.gz
/usr/share/doc/libmysqlclient18/copyright
/var/cache/apt/archives/libmysqlclient18_5.5.43-0+deb7u1_amd64.deb
/var/cache/apt/archives/libmysqlclient18_5.5.44-0+deb7u1_amd64.deb
/var/lib/dpkg/info/libmysqlclient18:amd64.list
/var/lib/dpkg/info/libmysqlclient18:amd64.md5sums
/var/lib/dpkg/info/libmysqlclient18:amd64.postinst
/var/lib/dpkg/info/libmysqlclient18:amd64.postrm
/var/lib/dpkg/info/libmysqlclient18:amd64.shlibs
I read about some forum, the need to make a symbolic link I tried but I always this error
Assuming that for getting this error you installed Qt from the binary packages downloaded from qt.io:
Install the MySQL client dev packages
Run the MaintenanceTool (somewhere where you installed Qt)
Ask it to install extra packages
Install the "Source Components" for at least the Essential modules
Go to /dir/where/you/installed/Qt/version/Source/
Go into qtbase/src/plugins/sqldrivers/mysql
Run qmake from the very same Qt version (/dir/where/you/installed/Qt/version/arch/bin/qmake or similar)
Run make, if it explodes with headers/libraries not found check that you installed those MySQL client dev packages correctly
That should give you a brand new plugin, and with fingers crossed, it's already put in the right place. Otherwise find the new libqsqlmysql.so, ldd it to be sure it was OK, and overwrite the old plugin with the new one.
I finally found a solution to my problem, so I have download libmysqlclient16 from libmysqlclient16 Debian amd64
After I made dpkg -i libmysqlclient16_5.1.73-1_amd64.deb
I restart and I compile my Qt project and I could not error
I know it is an old question, but I had the same issue with a slightly different solution probably due to Qt updates since then.
I will provide the solution that worked for me running Fedora 26 with kernel 4.13 and Qt 5.9.1
Find your path to Qt installation and let's call it here QTDIR.
In my case it is installed at /home/Qt5. So QTDIR = /home/Qt5/
My version is 5.9.1. Therefore I also have a folder "5.9.1" in QTDIR and I will call it "version" folder as Pepe did above.
The last folder that depends on your installation is the compiler folder. In my case it is gcc_64 inside QTDIR/version/
Now that you located yourself, let's go the procedure to install the drivers for Qt.
1) If your linux distribution doesn't come with SQL headers installed you must install them first. In Fedora I istalled the community-mysql-devel
> sudo dnf install community-mysql-devel
You must search and the install the appropriate SQL package for your distro. Just remember that the main idea is to install some development package in order to access the headers.
2) The second thing you need to do is to make sure you had installed Qt with the sources directory.
Check if you have the foulder $QTDIR/version/Src. If you have not, then run the maintenance tool in QTDIR and add Src foulder by checking the "sources" option under the kit you had installed (or wish to install).
3) Then go to where the sqldrivers should be by typing in your terminal
> cd yourQTDIR/yourVersion/Src/qtbase/src/plugins/sqldrivers
and run on terminal:
> make
> make install
This should create the drivers libqsqlite.so and libqsqlmysql.so in the folder: yourQTDIR/yourVersion/yourCompiler/plugins/sqldrivers
We then move to update a path to the sql headers as described in the official site http://doc.qt.io/qt-5/sql-driver.html, but with a slightly difference in the path to mysql headers (you must verify the proper folders in your OS). In my case MYSQL headers are in /usr/lib64.
Go to
> cd yourQTDIR/yourVersion/Src/qtbase/src/plugins/sqldrivers/mysql
Then run
> yourQTDIR/yourVersion/yourCompilerFolder/bin/qmake "INCLUDEPATH+=/usr/include" "LIBS+=-L/usr/lib64 -lmysqlclient_r" mysql.pro
> make
> make install
This should do the trick.
4) Now go to "yourQTDIR"/"yourVersion"/"yourCompiler"/plugins/sqldrivers
and run
> ldd libqsqlmysql.so
This will allow you to check if there is any missing link and direct you to a more specific solution to your case.
In a couple of Qt versions from now the procedure above may change. However the main points to keep in mind are that 1) you must have the MYSQL headers installed; 2) you must create the plugin by running make and make install in some source folder for MYQSL, and 3) you must update the path to MYSQL headers in order to Qt to find it.